From 36c7d5b79188ef73cecfdf60499ea5e6a3caacf6 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Thu, 2 Dec 2021 10:35:37 +0100 Subject: [PATCH] config: tweak scripts --- .config/puddletag/puddletag.conf | 4 ++-- .local/bin/scripts/clean | 4 ++-- .local/bin/scripts/update-keyboard-layout | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.config/puddletag/puddletag.conf b/.config/puddletag/puddletag.conf index 29cbf4b..4eb0c22 100644 --- a/.config/puddletag/puddletag.conf +++ b/.config/puddletag/puddletag.conf @@ -43,7 +43,7 @@ "fontsize": 10, "rowsize": 43, "sort_fields": [ - "album" + "genre" ], "sort_reverse": false }, @@ -134,4 +134,4 @@ "Artist splitting" ] } -} +} \ No newline at end of file diff --git a/.local/bin/scripts/clean b/.local/bin/scripts/clean index 333c156..9f17152 100755 --- a/.local/bin/scripts/clean +++ b/.local/bin/scripts/clean @@ -11,7 +11,7 @@ _clean_folders=(~/.ant ~/.autopsy ~/.bundle ~/.cache ~/.cargo ~/.cpanm ~/.docker [[ $1 =~ "i" ]] && i=-i dir="$("$local" 2>/dev/null || echo "$HOME")" -df --output="source,avail" -h "$dir" +df --output="source,avail" -h $(test -n "$local" && echo ".") "$dir" highlight "home" for f in ${_clean_folders[@]} @@ -71,4 +71,4 @@ if [[ $1 =~ "o" ]]; then nix-store --optimize fi -df --output="source,avail" -h . +df --output="source,avail" -h $(test -n "$local" && echo ".") "$dir" diff --git a/.local/bin/scripts/update-keyboard-layout b/.local/bin/scripts/update-keyboard-layout index ecbdb36..555b807 100755 --- a/.local/bin/scripts/update-keyboard-layout +++ b/.local/bin/scripts/update-keyboard-layout @@ -13,5 +13,8 @@ xkbstate="$(dirname $(dirname $0))/xkblayout-state" test "$($xkbstate print %C)" -gt 1 && $xkbstate set $id # Swap semicolon and colon - https://unix.stackexchange.com/questions/615799/swap-semicolon-colon-to-p-unexpected-cause-semicolon-colon-affected-by-cpas-lock # test "$id" = "eu" && xmodmap -e 'keysym semicolon = colon semicolon colon semicolon' -test "$id" = "1" && setxkbmap eu && xmodmap -e 'keysym semicolon = colon semicolon colon semicolon' || setxkbmap de nodeadkeys +if test "$id" = "1" +then setxkbmap eu && xmodmap -e 'keysym semicolon = colon semicolon colon semicolon' +else setxkbmap de nodeadkeys caps:swapescape +fi } 2>&1 | tee -a /tmp/scripts.log