Skip to content

Instantly share code, notes, and snippets.

@kui
Last active October 6, 2015 03:27
Show Gist options
  • Save kui/2927572 to your computer and use it in GitHub Desktop.
Save kui/2927572 to your computer and use it in GitHub Desktop.
rbindkeys スタータースクリプト。本当だったらこれ相等の機能を、rbindkeys に組み込む必要あり。
[Desktop Entry]
Encoding=UTF-8
Name=rbindkeys
Comment=key remapper
#Icon=blueman
Exec=gksudo /home/kui/.local/bin/start_rbindkeys.sh
Terminal=false
Type=Application
Categories=
#!/bin/sh
#dev_name="Apple Wireless Keyboard"
dev_name="キーボード"
# gksudo "rbindkeys -l"
start() {
evdev=`/usr/local/bin/rbindkeys -l | grep "$dev_name" | head -n 1 | cut -f1 | sed s/:$//`
if [ "$evdev" ]
then
echo started
/usr/local/bin/rbindkeys --config /home/kui/.rbindkeys.rb "$evdev" 2>&1 >/dev/null
else
echo error
fi
}
start | logger -t rbindkeys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment