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

layout=$(cat $HOME/.cache/layout)

case "$layout" in
	ca) setxkbmap -model pc104 -layout us -variant ,,
			echo us > $HOME/.cache/layout
			;;
	us) setxkbmap -model pc104 -layout ca -variant ,,
			echo ca > $HOME/.cache/layout
			;;
		*) setxkbmap -model pc104 -layout us -variant ,,
			echo us > $HOME/.cache/layout
			;;
	esac

kill -38 $(pidof dwmblocks)