diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..3ceb22f --- /dev/null +++ b/.bashrc @@ -0,0 +1 @@ +unset HISTFILE diff --git a/.config/redshift.conf b/.config/redshift.conf index 0c4170b..58366d8 100644 --- a/.config/redshift.conf +++ b/.config/redshift.conf @@ -1,5 +1,6 @@ [redshift] -temp-day=6000 +temp-day=5000 +temp-night=3500 location-provider=manual [manual] diff --git a/.config/sway/config.d/20-io.conf b/.config/sway/config.d/20-io.conf index 641a29d..17ab596 100644 --- a/.config/sway/config.d/20-io.conf +++ b/.config/sway/config.d/20-io.conf @@ -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 } diff --git a/.config/sway/config.d/30-startup.conf b/.config/sway/config.d/30-startup.conf index 46c111f..a6490a4 100644 --- a/.config/sway/config.d/30-startup.conf +++ b/.config/sway/config.d/30-startup.conf @@ -15,4 +15,3 @@ bar swaybar_command waybar exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec gammastep -exec blueman-applet diff --git a/.config/waybar/config b/.config/waybar/config index 9eca8a8..9928682 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -72,8 +72,8 @@ "format": "{name}", }, "custom/crypto": { - "exec": "crypto", - "interval": 3600, + "exec": "crypto.sh", + "interval": 600, } } diff --git a/.config/zsh/.docker_aliases b/.config/zsh/.docker_aliases index 53d9003..18349ce 100644 --- a/.config/zsh/.docker_aliases +++ b/.config/zsh/.docker_aliases @@ -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 diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 67b3692..c0d0455 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -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 diff --git a/.config/zsh/.zsh_aliases b/.config/zsh/.zsh_aliases index b52ec79..b9ca3e4 100644 --- a/.config/zsh/.zsh_aliases +++ b/.config/zsh/.zsh_aliases @@ -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]}" diff --git a/.xinitrc b/.xinitrc index 5f93734..952871e 100644 --- a/.xinitrc +++ b/.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 & diff --git a/.zshenv b/.zshenv index f5f0306..db765b3 100644 --- a/.zshenv +++ b/.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 diff --git a/bin/crypto b/bin/crypto index 841891c..9531ed7 100755 Binary files a/bin/crypto and b/bin/crypto differ diff --git a/bin/crypto.sh b/bin/crypto.sh deleted file mode 100755 index c66ed73..0000000 --- a/bin/crypto.sh +++ /dev/null @@ -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" diff --git a/bin/dkprune b/bin/dkprune index c0af3bb..30e514c 100755 --- a/bin/dkprune +++ b/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 diff --git a/bin/meestic b/bin/meestic deleted file mode 100755 index e6416a4..0000000 Binary files a/bin/meestic and /dev/null differ diff --git a/bin/moonlight b/bin/moonlight deleted file mode 100755 index 0eb66a2..0000000 --- a/bin/moonlight +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -$HOME/Applications/Moonlight-4.3.1-x86_64.AppImage diff --git a/bin/sbar b/bin/sbar index 8b9e921..a600405 100755 --- a/bin/sbar +++ b/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() { diff --git a/bin/virt-manager b/bin/virt-manager deleted file mode 100755 index b380951..0000000 --- a/bin/virt-manager +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -systemctl is-active libvirtd | grep -q inactive && pkexec systemctl start libvirtd -/usr/bin/virt-manager