summaryrefslogtreecommitdiff
path: root/.local/bin/layouthandler
blob: 0596799d5df02aac887cb1985fcd5506eff8a8d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

layout="$(setxkbmap -query | awk '$1 ~ /layout/ { print $2 }')"
alt_layout=${ALT_KB_LAYOUT?Alternative layout not set!}

case $layout in
en_US)
	setxkbmap -layout "$alt_layout"
	;;
*)
	setxkbmap -layout en_US
	;;
esac