feat: new pc conf
This commit is contained in:
parent
99847eda69
commit
ded281b797
@ -1,5 +1,6 @@
|
||||
[redshift]
|
||||
temp-day=6000
|
||||
temp-day=5000
|
||||
temp-night=3500
|
||||
location-provider=manual
|
||||
|
||||
[manual]
|
||||
|
@ -16,7 +16,7 @@ input type:touchpad {
|
||||
|
||||
output {
|
||||
eDP-1 position 0 0
|
||||
DP-2 position 1920 0
|
||||
DP-3 position 3840 0
|
||||
DP-3 position 1920 0
|
||||
DP-2 position 3840 0
|
||||
* bg $wallpapers/landscape.png fill
|
||||
}
|
||||
|
@ -15,4 +15,3 @@ bar swaybar_command waybar
|
||||
|
||||
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec gammastep
|
||||
exec blueman-applet
|
||||
|
@ -72,8 +72,8 @@
|
||||
"format": "{name}",
|
||||
},
|
||||
"custom/crypto": {
|
||||
"exec": "crypto",
|
||||
"interval": 3600,
|
||||
"exec": "crypto.sh",
|
||||
"interval": 600,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
if ! [ -w '/var/run/docker.sock' ]; then
|
||||
alias docker='sudo docker'
|
||||
fi
|
||||
alias docker='podman'
|
||||
alias docker-compose='podman-compose'
|
||||
|
||||
# docker
|
||||
alias dk='docker'
|
||||
@ -12,8 +11,6 @@ alias dkcls='docker container ls'
|
||||
alias dkclsa='docker container ls -a'
|
||||
alias dkclsaq='docker container ls -a -q'
|
||||
alias dkclsq='docker container ls -q'
|
||||
alias dkcp!='docker container prune -f'
|
||||
alias dkcp='docker container prune'
|
||||
alias dkcrm!='docker container rm -f'
|
||||
alias dkcrm='docker container rm'
|
||||
alias dkcsp='docker container stop'
|
||||
@ -34,11 +31,9 @@ alias dkils='docker image ls'
|
||||
alias dkilsa='docker image ls -a'
|
||||
alias dkilsaq='docker image ls -a -q'
|
||||
alias dkilsq='docker image ls -q'
|
||||
alias dkip='docker image prune'
|
||||
alias dkip='docker image push'
|
||||
alias dkip!='docker image prune -f'
|
||||
alias dkirm='docker image rm'
|
||||
alias dkirm!='docker image rm -f'
|
||||
alias dkirm='docker image rm'
|
||||
alias dkis='docker image save'
|
||||
alias dkit='docker image tag'
|
||||
|
||||
@ -48,10 +43,8 @@ alias dkvc='docker volume create'
|
||||
alias dkvi='docker volume inspect'
|
||||
alias dkvls='docker volume ls'
|
||||
alias dkvlsq='docker volume ls -q'
|
||||
alias dkvp='docker volume prune'
|
||||
alias dkvp!='docker volume prune -f'
|
||||
alias dkvrm='docker volume rm'
|
||||
alias dkvrm!='docker volume rm -f'
|
||||
alias dkvrm='docker volume rm'
|
||||
|
||||
## network
|
||||
alias dkn='docker network'
|
||||
@ -59,45 +52,37 @@ alias dknc='docker network create'
|
||||
alias dkni='docker network inspect'
|
||||
alias dknls='docker network ls'
|
||||
alias dknlsq='docker network ls -q'
|
||||
alias dknp='docker network prune'
|
||||
alias dknpf='docker network prune -f'
|
||||
alias dknrm='docker network rm'
|
||||
alias dknrm!='docker network rm -f'
|
||||
alias dknrm='docker network rm'
|
||||
|
||||
## system
|
||||
alias dks='docker system'
|
||||
alias dksdf='docker system df'
|
||||
alias dksp!='docker system prune -f'
|
||||
alias dksp='docker system prune'
|
||||
alias dkspa='docker system prune -a'
|
||||
alias dkspaf='docker system prune -a -f'
|
||||
alias dkspv!='docker system prune --volumes -f'
|
||||
alias dkspv='docker system prune --volumes'
|
||||
alias dkspva='docker system prune --volumes -a'
|
||||
alias dkspvaf='docker system prune --volumes -a -f'
|
||||
|
||||
# compose
|
||||
alias dc='docker compose'
|
||||
alias dcd='docker compose down'
|
||||
alias dcup='docker compose up -d'
|
||||
alias dcupb='docker compose up -d --build'
|
||||
alias dc='docker-compose'
|
||||
alias dcd='docker-compose down'
|
||||
alias dcup='docker-compose up -d'
|
||||
alias dcupb='docker-compose up -d --build'
|
||||
|
||||
## container
|
||||
alias dccls='docker compose ps'
|
||||
alias dcclsq='docker compose ps -q'
|
||||
alias dcex='docker compose exec'
|
||||
alias dcr='docker compose run --rm'
|
||||
alias dcrd='docker compose run -d --rm'
|
||||
alias dcrm!='docker compose rm -f'
|
||||
alias dcrm='docker compose rm'
|
||||
alias dcrmv!='docker compose rm -v -f'
|
||||
alias dcrmv='docker compose rm -v'
|
||||
alias dcsp='docker compose stop'
|
||||
alias dcst='docker compose restart'
|
||||
alias dccls='docker-compose ps'
|
||||
alias dcclsq='docker-compose ps -q'
|
||||
alias dcex='docker-compose exec'
|
||||
alias dcr='docker-compose run --rm'
|
||||
alias dcrd='docker-compose run -d --rm'
|
||||
alias dcrm!='docker-compose rm -f'
|
||||
alias dcrm='docker-compose rm'
|
||||
alias dcrmv!='docker-compose rm -v -f'
|
||||
alias dcrmv='docker-compose rm -v'
|
||||
alias dcsp='docker-compose stop'
|
||||
alias dcst='docker-compose restart'
|
||||
|
||||
## image
|
||||
alias dcb!='docker compose build --no-cache'
|
||||
alias dcb='docker compose build'
|
||||
alias dcl='docker compose pull'
|
||||
alias dcb!='docker-compose build --no-cache'
|
||||
alias dcb='docker-compose build'
|
||||
alias dcl='docker-compose pull'
|
||||
|
||||
# vim: ft=zsh
|
||||
|
@ -1,6 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$XDG_VTNR" = 1 ] && select SESSION in startx sway; do
|
||||
[ "$SESSION" = sway ] && export XDG_CURRENT_DESKTOP=sway
|
||||
exec $SESSION > "$HOME/.gui.log" 2>&1
|
||||
done
|
||||
[ "$XDG_VTNR" = 1 ] && exec startx > "$HOME/.gui.log" 2>&1
|
||||
|
@ -1,5 +1,4 @@
|
||||
# system
|
||||
alias cls='clear && ls -lah'
|
||||
alias tmp='cd "$(mktemp -d)"'
|
||||
alias update='sudo pacman -Syu && config submodule update --remote --recursive --init'
|
||||
alias vi='$EDITOR'
|
||||
@ -12,6 +11,9 @@ alias zconf='(cd "$ZDOTDIR/" && $EDITOR .) && . "$ZDOTDIR/.zshrc"'
|
||||
|
||||
# dev
|
||||
alias make='make -j8'
|
||||
gi() {
|
||||
curl -Lf "https://www.gitignore.io/api/${(j:,:)@}"
|
||||
}
|
||||
|
||||
# compatibility
|
||||
alias ssh='TERM=linux ssh'
|
||||
@ -26,7 +28,7 @@ alias watch='coloralias watch -c -- '
|
||||
alias xargs='xargs '
|
||||
|
||||
function j() {
|
||||
local dirs=(**/"$1")
|
||||
local dirs=(**/"$1"/)
|
||||
|
||||
if [ -z "${dirs[2]}" ]; then
|
||||
cd "${dirs[1]}"
|
||||
|
12
.xinitrc
12
.xinitrc
@ -4,14 +4,10 @@
|
||||
numlockx
|
||||
|
||||
# display
|
||||
(
|
||||
LAPTOP_SCREEN="$(xrandr --listmonitors | grep eDP | awk '{print $4}')"
|
||||
|
||||
xrandr \
|
||||
--output "${LAPTOP_SCREEN}" --mode 1920x1080 --rate 60 --primary \
|
||||
--output DisplayPort-1-1 --auto --pos 1920x0 \
|
||||
--output DisplayPort-1-2 --auto --pos 3840x0
|
||||
)
|
||||
xrandr \
|
||||
--output eDP-1 --auto --primary \
|
||||
--output DisplayPort-1-1 --auto --pos 1920x0 \
|
||||
--output DisplayPort-1-2 --auto --pos 3840x0
|
||||
|
||||
# startup
|
||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||
|
3
.zshenv
3
.zshenv
@ -19,6 +19,3 @@ export EDITOR='nvim'
|
||||
|
||||
export XDG_CURRENT_DESKTOP=Unity
|
||||
export QT_STYLE_OVERRIDE=Materia-dark
|
||||
|
||||
# Wayland
|
||||
export WLR_EGL_NO_MODIFIERS=1
|
||||
|
BIN
bin/crypto
BIN
bin/crypto
Binary file not shown.
@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
function get_value() {
|
||||
local to="$1"
|
||||
local from="$2"
|
||||
|
||||
curl "$API$from$to" 2> /dev/null | jq -r .price
|
||||
}
|
||||
|
||||
if [ -t 1 ]; then
|
||||
NORMAL='\e[0m'
|
||||
BOLD='\e[1m'
|
||||
fi
|
||||
|
||||
API='https://api.binance.com/api/v3/avgPrice?symbol='
|
||||
|
||||
DELIM='='
|
||||
TO=EUR
|
||||
|
||||
# COIN=VALUE
|
||||
WALLET="${XDG_CONFIG_HOME-"$HOME"/.config}/crypto/wallet"
|
||||
|
||||
TOTAL=0
|
||||
while read -r line; do
|
||||
COIN="$(echo "$line" | cut -d "$DELIM" -f 1)"
|
||||
QTY="$(echo "$line" | cut -d "$DELIM" -f 2)"
|
||||
|
||||
MARKET="$(get_value "$TO" "$COIN")"
|
||||
VALUE="$(echo "$MARKET * $QTY" | bc)"
|
||||
TOTAL="$(echo "$TOTAL + $VALUE" | bc)"
|
||||
|
||||
printf "${BOLD}${COIN}${NORMAL}=%.2f€ " "$VALUE"
|
||||
done < "$WALLET"
|
||||
|
||||
printf "${BOLD}TOT${NORMAL}=%.2f€\n" "$TOTAL"
|
18
bin/dkprune
18
bin/dkprune
@ -3,7 +3,7 @@
|
||||
function usage() {
|
||||
cat << EOF
|
||||
Usage: $0 [-hcCviIna]
|
||||
Prune Docker resources.
|
||||
Prune $RUNTIME resources.
|
||||
If no option provided, defaults to -Cvn
|
||||
Options:
|
||||
-h Show this help and exits
|
||||
@ -30,7 +30,9 @@ function add_opt() {
|
||||
echo "$RESULT"
|
||||
}
|
||||
|
||||
if ! [ -w '/var/run/docker.sock' ] && [ "$EUID" != 0 ]; then
|
||||
RUNTIME="$(basename "$(command -v podman || command -v docker)")"
|
||||
|
||||
if ! $RUNTIME container ls > /dev/null 2>&1 && [ "$EUID" != 0 ]; then
|
||||
exec sudo -- "$0" "$@"
|
||||
fi
|
||||
|
||||
@ -95,15 +97,15 @@ VALUES=(
|
||||
CON='container'
|
||||
PRUNE='prune -f'
|
||||
COMMANDS=(
|
||||
"docker system $PRUNE $IMG_OPT --volumes"
|
||||
"docker system $PRUNE $IMG_OPT"
|
||||
"docker volume $PRUNE"
|
||||
"docker image $PRUNE $IMG_OPT"
|
||||
"docker network $PRUNE"
|
||||
"$RUNTIME system $PRUNE $IMG_OPT --volumes"
|
||||
"$RUNTIME system $PRUNE $IMG_OPT"
|
||||
"$RUNTIME volume $PRUNE"
|
||||
"$RUNTIME image $PRUNE $IMG_OPT"
|
||||
"$RUNTIME network $PRUNE"
|
||||
)
|
||||
|
||||
if [ "$((CLEAN & "$c"))" == "$c" ]; then
|
||||
docker "$CON" ls -aq | xargs docker "$CON" rm "$CON_OPT" 2> /dev/null
|
||||
$RUNTIME "$CON" ls -aq | xargs "$RUNTIME" "$CON" rm "$CON_OPT" 2> /dev/null
|
||||
fi
|
||||
|
||||
for idx in "${!VALUES[@]}"; do
|
||||
|
BIN
bin/meestic
BIN
bin/meestic
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
$HOME/Applications/Moonlight-4.3.1-x86_64.AppImage
|
4
bin/sbar
4
bin/sbar
@ -17,8 +17,8 @@ update_memory() {
|
||||
}
|
||||
|
||||
update_bat() {
|
||||
bat="$(grep -q Charging /sys/class/power_supply/BAT1/status && printf '' || printf '')"
|
||||
bat="$bat $(cat /sys/class/power_supply/BAT1/capacity)%"
|
||||
bat="$(grep -q Charging /sys/class/power_supply/BAT0/status && printf '' || printf '')"
|
||||
bat="$bat $(cat /sys/class/power_supply/BAT0/capacity)%"
|
||||
}
|
||||
|
||||
update_vol() {
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
systemctl is-active libvirtd | grep -q inactive && pkexec systemctl start libvirtd
|
||||
/usr/bin/virt-manager
|
Loading…
Reference in New Issue
Block a user