aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/awesome-xinputD
blob: 393555aa4b6dac87045e093adbc814a6a60732bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

apply_settings() {
    sleep 2
    xinput set-prop pointer:"Synaptics TM3276-022" "Device Enabled" 0
    xinput set-prop pointer:"G2Touch Multi-Touch by G2TSP" "Device Enabled" 0
    xinput set-prop pointer:"TPPS/2 IBM TrackPoint" "libinput Scrolling Pixel Distance" 10
    xinput set-prop pointer:"Logitech USB Trackball" "libinput Accel Speed" 1.000000
    xinput set-prop pointer:"Logitech K400 Plus" "libinput Accel Speed" 0.800000
    xinput set-prop pointer:"Logitech K400 Plus" "libinput Natural Scrolling Enabled" 1
    [ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
}

apply_settings

while true; do
    state=$(lsusb)
    sleep 2
    [ "$state" != "$(lsusb)" ] && apply_settings
done