diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-11-18 18:48:49 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-11-18 18:48:49 +0100 |
commit | 3ed52a75442a01cfa2bf40420469ce86dadfc329 (patch) | |
tree | ce556fcb8cc8749effa0a15568785dd742a0469b | |
parent | dab0f2954bdec40e3c85dcdaeb16cdbb403072ef (diff) |
fuzzel: Switch from wofi to fuzzel
-rw-r--r-- | .config/fuzzel/fuzzel.ini | 27 | ||||
-rwxr-xr-x | .local/bin/chkb | 30 | ||||
-rwxr-xr-x | .local/bin/osel | 2 | ||||
-rwxr-xr-x | .local/bin/vlt | 1 |
4 files changed, 46 insertions, 14 deletions
diff --git a/.config/fuzzel/fuzzel.ini b/.config/fuzzel/fuzzel.ini new file mode 100644 index 0000000..fad8948 --- /dev/null +++ b/.config/fuzzel/fuzzel.ini @@ -0,0 +1,27 @@ +[main] +font=SF Compact Text:size=10 +fuzzy=no +password-character=• +prompt="" +terminal=foot +lines=20 +width=40 +layer=overlay +line-height=14 +inner-pad=8 + +[colors] +background=2B303BE6 +border=FAA14FFF +text=C5C8C6FF +selection=414859E6 +selection-text=C5C8C6FF + +[border] +width=3 +radius=8 + +[key-bindings] +prev="Up Control+k" +next="Down Control+j" +delete-line="Control+Shift+k" diff --git a/.local/bin/chkb b/.local/bin/chkb index 1dcf729..7bfefcc 100755 --- a/.local/bin/chkb +++ b/.local/bin/chkb @@ -2,20 +2,26 @@ set -e -OSEL_GUI_FLAGS='-r "echo \"%s\" | cut -f2 | xargs echo -n"' -export OSEL_GUI_FLAGS="$OSEL_GUI_FLAGS -Oalphabetical" -export OSEL_TERM_FLAGS='--with-nth=2..' readonly KEYBOARD=at-translated-set-2-keyboard -if choice="` - sed -En 's/\s*name\[Group1\]\s*=\s*"([^"]*)"\s*;\s*/\1/p' \ - ~/.xkb/symbols/mango \ - | sort \ - | nl -v0 -nln \ - | osel -`" +s="$( + { + hyprctl -j getoption input:kb_layout + hyprctl -j getoption input:kb_variant + } | jq ' + .str | split(",\\s*"; "g") + ' | jq -rn ' + [inputs] + | transpose + | map("\(.[0]) (\(.[1]))") + | .[] + ' | sed -E 's/[a-zA-Z]+/\u&/g' +)" + +if choice="$(echo "$s" | osel)" then - hyprctl switchxkblayout $KEYBOARD ${choice% *} >/dev/null + n="$(echo "$s" | sed -n "/$choice/=" | xargs expr -1 +)" + hyprctl switchxkblayout $KEYBOARD $n >/dev/null notify "${0##*/}" keyboard 'Keyboard Layout Changed' \ - "The keyboard layout was changed to ‘${choice##* }’" + "The keyboard layout was changed to ‘$choice’" fi diff --git a/.local/bin/osel b/.local/bin/osel index c289b19..3d9e543 100755 --- a/.local/bin/osel +++ b/.local/bin/osel @@ -5,7 +5,7 @@ if [ -t 2 ] then eval fzf $OSEL_TERM_FLAGS else - eval wofi -d $OSEL_GUI_FLAGS + eval fuzzel -d $OSEL_GUI_FLAGS fi`" [ -z "$x" ] && exit 1 printf '%s' "$x" diff --git a/.local/bin/vlt b/.local/bin/vlt index 0f253b3..fe72cd2 100755 --- a/.local/bin/vlt +++ b/.local/bin/vlt @@ -296,7 +296,6 @@ raw() : ${VAULT_2FA:="2fa"} : ${VAULT_HOME:=${XDG_DATA_HOME:-$HOME/.local/share}/vault} readonly VAULT="${VAULT_HOME}/vault.sec" -export OSEL_GUI_FLAGS='-Oalphabetical' [ $# -eq 0 ] && usage |