summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.local/bin/layouthandler6
1 files changed, 5 insertions, 1 deletions
diff --git a/.local/bin/layouthandler b/.local/bin/layouthandler
index 0596799..6002ef4 100755
--- a/.local/bin/layouthandler
+++ b/.local/bin/layouthandler
@@ -1,13 +1,17 @@
#!/bin/sh
layout="$(setxkbmap -query | awk '$1 ~ /layout/ { print $2 }')"
-alt_layout=${ALT_KB_LAYOUT?Alternative layout not set!}
+alt_layout="${ALT_KB_LAYOUT?Alternative layout not set!}"
+
+echo "$layout"
case $layout in
en_US)
setxkbmap -layout "$alt_layout"
+ notify-send "Layout Changed." "Keyboard set to $alt_layout."
;;
*)
setxkbmap -layout en_US
+ notify-send "Layout Changed." "Keyboard set to en_US."
;;
esac