dotfiles

custom dotfiles
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

switchkb (342B)


      1 #!/usr/bin/zsh
      2 
      3 if [ "$1" = "" ] ; then
      4 	echo "which language, gb or us?"
      5 	exit 0
      6 else
      7 	lang=$1
      8 fi
      9 
     10 kill $(pidof xcape)
     11 setxkbmap -option
     12 if [[ "$lang" == "colemak" ]] ; then
     13 	setxkbmap -option ctrl:nocaps us -variant colemak-ctrl
     14 else
     15 	setxkbmap -option ctrl:nocaps $lang
     16 fi
     17 xcape -e 'Control_L=Escape'
     18 
     19 echo "keyboard is switched to $lang"