summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-01-14 23:04:52 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-01-14 23:04:52 +0100
commit223a55406ddf4e5325fd7ec2f250ef594751067c (patch)
tree5c56a5031df75e3050dbe5ba515c73ee1c65dba9
parent5e4dd0d829ec5f8be153a817f09952fbb08394b4 (diff)
Update layouthandler with envar
-rwxr-xr-x.local/bin/layouthandler12
1 files changed, 8 insertions, 4 deletions
diff --git a/.local/bin/layouthandler b/.local/bin/layouthandler
index 0bd8d33..3f8e74e 100755
--- a/.local/bin/layouthandler
+++ b/.local/bin/layouthandler
@@ -1,10 +1,14 @@
#!/bin/sh
layout="$(setxkbmap -query | awk '$1 ~ /layout/ { print $2 }')"
+alt_layout=${ALT_KB_LAYOUT?Alternative layout not set!}
+echo "$alt_layout"
case $layout in
- en_US)
- setxkbmap -layout se ;;
- *)
- setxkbmap -layout en_US
+en_US)
+ setxkbmap -layout "$alt_layout"
+ ;;
+*)
+ setxkbmap -layout en_US
+ ;;
esac