From a3f1f4fbc3dbb1fcdd16a874e829f0cbd4c29870 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 20 Nov 2023 23:50:36 +0100 Subject: chkb: Simplify implementation --- .local/bin/chkb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to '.local/bin/chkb') 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’" -- cgit v1.2.3