aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/xinput-daemon.sh
blob: dfb35446b4ae7f9b3b274a03561acc4ff67b01cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh


apply_settings () {

	sleep 2
    input-remapper-control --command stop-all && input-remapper-control --command autoload
	xinput set-prop pointer:"Logitech USB Trackball" "libinput Natural Scrolling Enabled" 1
	xinput set-prop pointer:"Logitech USB Trackball" "libinput Accel Speed" 1.000000
	xinput set-prop pointer:"SteelSeries SteelSeries Rival 310 eSports Mouse" "libinput Accel Speed" 0.300000
	xinput set-prop pointer:"ELECOM ELECOM TrackBall Mouse" "libinput Accel Speed" 0.300000
	xinput set-prop pointer:"Logitech M705" "libinput Accel Speed" 1.000000

}

apply_settings

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