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

apply_settings() {
    sleep 2
    xinput set-prop pointer:"Logitech USB Trackball" "libinput Accel Speed" 1.000000
    [ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
}

apply_settings

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