vincentbernat.i3wm-configur.../bin/input-event

52 lines
1.2 KiB
Text
Raw Normal View History

#!/bin/sh
# Event handler for inputplug
event="$1"
device="$2"
use="$3"
name="$4"
[ x"$event" = x"XIDeviceEnabled" ] || exit 0
# Load the given keymap
xkb() {
xkbcomp -i ${device} -w 0 -I$HOME/.config/awesome/xkb \
$HOME/.config/awesome/xkb/$1.xkb ${DISPLAY}
}
printf "input-event: $use: [%3d] $name\n" $device
case "$use,$(uname -n),$name" in
XISlaveKeyboard,zoro,"Topre Corporation Realforce 87")
2014-09-17 18:33:07 +02:00
# Are we getting docked?
sleep 2
dock
xkb default
2014-09-17 18:33:07 +02:00
;;
XISlaveKeyboard,zoro,"AT Translated Set 2 keyboard")
xkb x1
;;
XISlaveKeyboard,guybrush,"AT Translated Set 2 keyboard")
xkb norwin
;;
XISlaveKeyboard,*,"ThinkPad Extra Buttons")
xkb thinkpad-extra
;;
XISlaveKeyboard,*)
xkb default
;;
XISlavePointer,*,"Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)")
xinput set-ptr-feedback $device 3 3 1
;;
XISlavePointer,*,"TPPS/2 IBM TrackPoint")
2014-07-03 11:11:29 +02:00
xinput set-ptr-feedback $device 2 5 1
;;
XISlavePointer,zoro,"SynPS/2 Synaptics TouchPad")
# Everything is configured correctly by default
;;
XISlavePointer,zoro,"ELAN Touchscreen")
2014-06-11 17:53:13 +02:00
xinput disable $device
;;
esac