aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlista Kanjo2022-04-26 10:43:19 -0400
committerBlista Kanjo2022-04-26 10:43:19 -0400
commita54e658781889bb688ac649200774c09f41de37b (patch)
treeaab03717837d9f42714fe547893f9ffe242136d7
parent62e08895caa0dd1644bb7aa78dfd8f5ba5310785 (diff)
reimplementation of mouse settings daemon
-rwxr-xr-xawesome/xinput-daemon.sh21
-rwxr-xr-xawesome/xinput.sh9
2 files changed, 14 insertions, 16 deletions
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
diff --git a/awesome/xinput.sh b/awesome/xinput.sh
deleted file mode 100755
index e0cf56b..0000000
--- a/awesome/xinput.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-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