mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-23 02:08:35 +02:00
46 lines
1.1 KiB
Bash
Executable file
46 lines
1.1 KiB
Bash
Executable file
#!/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/i3/dotfiles/xkb \
|
|
$HOME/.config/i3/dotfiles/xkb/$1.xkb ${DISPLAY}
|
|
}
|
|
|
|
case $event in
|
|
XIDeviceDisabled) exit 0 ;;
|
|
XISlaveRemoved) exit 0 ;;
|
|
esac
|
|
|
|
printf "input-event: $use: [%3d] $event $name\n" $device
|
|
|
|
set +x
|
|
case "$event,$use,$(uname -n),$name" in
|
|
*,XISlaveKeyboard,guybrush,"Topre Corporation Realforce 87")
|
|
xkb default
|
|
;;
|
|
*,XISlaveKeyboard,chocobo,"AT Translated Set 2 keyboard")
|
|
xkb x1gen2
|
|
;;
|
|
*,XISlaveKeyboard,*,"ThinkPad Extra Buttons")
|
|
xkb thinkpad-extra
|
|
;;
|
|
*,XISlaveKeyboard,*)
|
|
xkb default
|
|
;;
|
|
*,XISlavePointer,*,"Logitech USB Receiver Mouse")
|
|
xinput set-ptr-feedback $device 30 5 2
|
|
;;
|
|
*,XISlavePointer,*,"TPPS/2 IBM TrackPoint")
|
|
xinput set-prop $device "libinput Accel Speed" 1
|
|
;;
|
|
*,XISlavePointer,*,"ELAN Touchscreen")
|
|
xinput disable $device
|
|
;;
|
|
esac
|