diff --git a/caps_lock.sh b/caps_lock.sh new file mode 100755 index 0000000..e7683a0 --- /dev/null +++ b/caps_lock.sh @@ -0,0 +1,9 @@ +# 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 \ No newline at end of file