summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-20 23:50:36 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-20 23:50:36 +0100
commita3f1f4fbc3dbb1fcdd16a874e829f0cbd4c29870 (patch)
tree5c8d22be61251b6dc2cc202fafaf891675faa216 /.local/bin
parent9a59a73f8983af190e846c07fd6c9e5b307220a0 (diff)
chkb: Simplify implementation
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/chkb11
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’"