dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

switchkb (350B)


      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 colemak-ctrl
     14 	xmodmap ~/.xmodmap
     15 else
     16 	setxkbmap -option ctrl:nocaps $lang
     17 fi
     18 xcape -e 'Control_L=Escape'
     19 
     20 echo "keyboard is switched to $lang"