Created
May 10, 2010 05:20
-
-
Save iratqq/395709 to your computer and use it in GitHub Desktop.
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 | |
| # xdotoolのdemo | |
| # usage: ./xdodemo.sh [ローマ字文字列] | |
| if [ x$1 = x ]; then | |
| in=kanji | |
| else | |
| in=$1 | |
| fi | |
| leafpad & | |
| f="" | |
| while [ x$f = x ] | |
| do | |
| f=`xdotool search --class --onlyvisible leafpad` | |
| sleep 1 | |
| done | |
| xdotool windowfocus $f | |
| for k in Zenkaku_Hankaku `echo $in|sed 's,\(.\),\1 ,g' | tr "[:lower:]" "[:upper:]"` space Return Zenkaku_Hankaku ctrl+q | |
| do | |
| xdotool key $k | |
| done | |
| sleep 3 | |
| xdotool key alt+n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment