Blob
1 # gamemode3 Switches the mice and keyboard back and forth from my custom setup to a4 'normal' one.6 #!/bin/sh8 set -e10 btn1=$(xmodmap -pp | awk '/ 1 / {print $2}')11 if [ "$btn1" = 3 ]; then # switch to dx mouse + us12 xmodmap -e 'pointer = 1 2 3'13 setxkbmap us14 else # switch to sx mouse + dvp-eu15 xmodmap -e 'pointer = 3 2 1'16 grep ^setxkbmap ~/.xsession | sh17 fi19 cwm sometime needs an "encouragement" when switching keyboard layout.21 pkill -HUP cwm || true