Removing the unused caps lock bindings.

- This was relevant in ubuntu, not in i3
This commit is contained in:
Abhay Rana 2015-08-14 01:40:50 +05:30
parent 6380d152f0
commit 00927cb500
2 changed files with 0 additions and 38 deletions

View File

@ -1,6 +0,0 @@
# Assign program names to key bindings
# Should be understood by xdotool key command
chrome="ctrl+l"
linuxdcpp="ctrl+l"
sublime_text="ctrl+Tab"
sublime_text_double_tap="space"

View File

@ -1,32 +0,0 @@
#!/bin/bash
# We use bash to get variable variables to work
# http://stackoverflow.com/questions/10757380/bash-variable-variables
# This script is called whenever I press the caps-lock.
# The key-binding is managed by xbindkey
# Constants
DELAY=200
SLEEP_DELAY=0.2 # Delay in milliseconds
DOUBLE_TAP_SUFFIX="_double_tap"
EPOCH=`date +%s%3N` # This is in milliseconds
LOCK=/tmp/caps_lock_double_tap.lock
source /home/nemo/projects/scripts/caps_lock.cfg
# Get the progam where caps lock was pressed
program=`ps -p $(xdotool getactivewindow getwindowpid) -o command= -c`
window=`xdotool getactivewindow`
if [ -e $LOCK ]; then
LASTTIME=`cat $LOCK`;
if [ $EPOCH -le $(($LASTTIME + $DELAY)) ]; then
program="$program$DOUBLE_TAP_SUFFIX"
xdotool key --window "$window" ${!program}
else
# This is a single click
sleep $SLEEP_DELAY
fi;
fi
echo "$EPOCH" > $LOCK;