summaryrefslogtreecommitdiff
path: root/.local/bin/layouthandler
blob: 6002ef4ad59975cf9c96e208c4750e7fabf0d605 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

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

echo "$layout"

case $layout in
en_US)
	setxkbmap -layout "$alt_layout"
	notify-send "Layout Changed." "Keyboard set to $alt_layout."
	;;
*)
	setxkbmap -layout en_US
	notify-send "Layout Changed." "Keyboard set to en_US."
	;;
esac