From a54e658781889bb688ac649200774c09f41de37b Mon Sep 17 00:00:00 2001 From: Blista Kanjo Date: Tue, 26 Apr 2022 10:43:19 -0400 Subject: reimplementation of mouse settings daemon --- awesome/xinput-daemon.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'awesome/xinput-daemon.sh') diff --git a/awesome/xinput-daemon.sh b/awesome/xinput-daemon.sh index a3b2db0..5fb7741 100755 --- a/awesome/xinput-daemon.sh +++ b/awesome/xinput-daemon.sh @@ -1,11 +1,18 @@ #!/bin/sh -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 Scrolling Pixel Distance" 50 -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)" ] && /home/kylert/.config/awesome/xinput.sh; done + sleep 2 + 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 Scrolling Pixel Distance" 50 + 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 -- cgit v1.2.3