From ffbea28e2f16161ad4f62078e5b20269243a7052 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 27 Feb 2026 20:56:50 +0100 Subject: chkb: Rewrite script to support Niri --- .local/bin/chkb | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100755 .local/bin/chkb (limited to '.local/bin') diff --git a/.local/bin/chkb b/.local/bin/chkb deleted file mode 100755 index 6abe5ae..0000000 --- a/.local/bin/chkb +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/local/bin/andy - -set -e NOTIFY_LONG keyboard -set -e NOTIFY_SHORT `basename $args[0] - -set KEYBOARD at-translated-set-2-keyboard - -set s `{ - { - hyprctl -j getoption input:kb_layout - hyprctl -j getoption input:kb_variant - } - | jq -rn ' - [inputs] - | map(.str | split(",\\s*"; "g")) - | transpose - | map("\(.[0]) (\(.[1]))") - | .[] - ' - | sed -E ' - s/[a-zA-Z]+/\u&/g - s/Us \(Basic\)/English (US)/ - ' -} - -set choice `echo $s | osel -set n `echo $s | sed -n "/$choice/=" | { xargs expr -1 + || true } -hyprctl switchxkblayout $KEYBOARD $n >_ -notify 'Keyboard Layout Changed' "The keyboard layout was changed to ‘$choice’" -- cgit v1.2.3