summaryrefslogtreecommitdiff
path: root/.local/bin/layouthandler
blob: 3f8e74e2b4c5fae8ffdefc9b0b232400a53d9d3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 "$alt_layout"
	;;
*)
	setxkbmap -layout en_US
	;;
esac