diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-11-20 23:50:36 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-11-20 23:50:36 +0100 |
commit | a3f1f4fbc3dbb1fcdd16a874e829f0cbd4c29870 (patch) | |
tree | 5c8d22be61251b6dc2cc202fafaf891675faa216 /.local/bin | |
parent | 9a59a73f8983af190e846c07fd6c9e5b307220a0 (diff) |
chkb: Simplify implementation
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/chkb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/.local/bin/chkb b/.local/bin/chkb index 7837e9b..d38aaa8 100755 --- a/.local/bin/chkb +++ b/.local/bin/chkb @@ -20,10 +20,7 @@ s="$( ' | sed -E 's/[a-zA-Z]+/\u&/g' )" -if choice="$(echo "$s" | osel)" -then - n="$(echo "$s" | sed -n "/$choice/=" | { xargs expr -1 + || true; })" - hyprctl switchxkblayout $KEYBOARD $n >/dev/null - notify 'Keyboard Layout Changed' \ - "The keyboard layout was changed to ‘$choice’" -fi +choice="$(echo "$s" | osel)" +n="$(echo "$s" | sed -n "/$choice/=" | { xargs expr -1 + || true; })" +hyprctl switchxkblayout $KEYBOARD $n >/dev/null +notify 'Keyboard Layout Changed' "The keyboard layout was changed to ‘$choice’" |