1
0
mirror of https://github.com/captn3m0/Scripts.git synced 2024-09-28 16:22:49 +00:00
scripts/caps_lock.sh
2014-08-30 00:55:35 +05:30

9 lines
360 B
Bash
Executable File

# This script is called whenever I press the caps-lock.
# The key-binding is managed by xbindkey
command=`ps -p $(xdotool getactivewindow getwindowpid) -o command= -c`
window=`xdotool getactivewindow`
if [ "$command" = "chrome" ]; then
xdotool key --window "$window" ctrl+l
elif [ "$command" = "linuxdcpp" ]; then
xdotool key --window "$window" ctrl+Tab
fi