Created
July 20, 2011 21:55
-
-
Save alloy-d/1096022 to your computer and use it in GitHub Desktop.
Script to toggle Colemak keyboard layout properly on ThinkPad and Cr-48.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ACTION=${1-help} | |
HOST=`hostname | cut -d'.' -f 1` | |
case "$ACTION" in | |
on) | |
setxkbmap us -variant colemak | |
xset r rate 255 | |
case "$HOST" in | |
nagato) # ThinkPad T61p | |
xset r 66 | |
;; | |
velaciela) # Cr-48 | |
xset r 66 | |
xset r 133 | |
xmodmap -e "keycode 133 = BackSpace" | |
xmodmap -e "clear Mod4" | |
;; | |
esac | |
;; | |
off) | |
setxkbmap us | |
;; | |
help) | |
echo "Usage: colemak.sh on|off" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment