summaryrefslogtreecommitdiff
path: root/.local/bin/layouthandler
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/layouthandler')
-rwxr-xr-x.local/bin/layouthandler10
1 files changed, 10 insertions, 0 deletions
diff --git a/.local/bin/layouthandler b/.local/bin/layouthandler
new file mode 100755
index 0000000..c1e850a
--- /dev/null
+++ b/.local/bin/layouthandler
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+layout="$(setxkbmap -query | awk '$1 ~ /layout/ { print $2 }"
+
+case $layout in
+ en_US)
+ setxkbmap -layout se ;;
+ *)
+ setxkbmap -layout en_US
+esac