summaryrefslogtreecommitdiff
path: root/.local/bin/layouthandler
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-01-07 15:30:44 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-01-07 15:30:44 +0100
commitb8cad9102fc1d42712364b48bcbff1998d429fbe (patch)
treea93f2482e465d9dfb017baa70abf29fab86d3c9b /.local/bin/layouthandler
parent8df06378acd473d5f996ff65686efc0460f3d403 (diff)
Add script for switching kb layout
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