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

55 lines
1.4 KiB
Text
Raw Normal View History

#!/bin/sh
# Event handler for inputplug
event="$1"
device="$2"
use="$3"
name="$4"
# Load the given keymap
xkb() {
xkbcomp -i ${device} -w 0 -I$HOME/.config/awesome/xkb \
$HOME/.config/awesome/xkb/$1.xkb ${DISPLAY}
}
2018-07-04 18:46:38 +02:00
printf "input-event: $use: [%3d] $event $name\n" $device
2018-07-04 18:46:38 +02:00
case "$event,$use,$(uname -n),$name" in
XIDeviceDisabled,XISlaveKeyboard,zoro,"Topre Corporation Realforce 87")
# Getting undocked
undock
;;
XIDeviceDisabled,*)
:
;;
*,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
;;
2018-07-04 18:46:38 +02:00
*,XISlaveKeyboard,zoro,"AT Translated Set 2 keyboard")
xkb x1
;;
2018-07-04 18:46:38 +02:00
*,XISlaveKeyboard,*,"ThinkPad Extra Buttons")
xkb thinkpad-extra
;;
2018-07-04 18:46:38 +02:00
*,XISlaveKeyboard,*)
xkb default
;;
2018-07-04 18:46:38 +02:00
*,XISlavePointer,*,"Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)")
xinput set-ptr-feedback $device 3 3 1
;;
2018-07-04 18:46:38 +02:00
*,XISlavePointer,*,"TPPS/2 IBM TrackPoint")
2018-07-22 12:15:01 +02:00
xinput set-ptr-feedback $device 2 5 1 # no effect?
xinput set-float-prop $device 'libinput Accel Speed' 0.5
;;
2018-07-04 18:46:38 +02:00
*,XISlavePointer,zoro,"SynPS/2 Synaptics TouchPad")
xinput set-props $device "libinput Natural Scrolling Enabled" 1
;;
2018-07-04 18:46:38 +02:00
*,XISlavePointer,zoro,"ELAN Touchscreen")
2014-06-11 17:53:13 +02:00
xinput disable $device
;;
esac