Blob


1 # gamemode
3 Switches the mice and keyboard back and forth from my custom setup to a
4 'normal' one.
6 #!/bin/sh
8 set -e
10 btn1=$(xmodmap -pp | awk '/ 1 / {print $2}')
11 if [ "$btn1" = 3 ]; then # switch to dx mouse + us
12 xmodmap -e 'pointer = 1 2 3'
13 setxkbmap us
14 else # switch to sx mouse + dvp-eu
15 xmodmap -e 'pointer = 3 2 1'
16 grep ^setxkbmap ~/.xsession | sh
17 fi
19 cwm sometime needs an "encouragement" when switching keyboard layout.
21 pkill -HUP cwm || true