diff options
| author | Blista Kanjo | 2023-06-16 13:26:11 -0400 |
|---|---|---|
| committer | Blista Kanjo | 2023-06-16 13:26:11 -0400 |
| commit | 230b0a287642be0de07e60b913fcafdd77f56f48 (patch) | |
| tree | 5f76ffb1197e0dc4b6bba9c125a8d8395afd3186 /.config/awesome/xinput-daemon.sh | |
| parent | cfc9dd17c40b92743f15b9d886e23cd21b11b57c (diff) | |
refactor: got into an argument with my girlfriend about tabs over spaces… and then I fell down the stairs
Diffstat (limited to '.config/awesome/xinput-daemon.sh')
| -rwxr-xr-x | .config/awesome/xinput-daemon.sh | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/.config/awesome/xinput-daemon.sh b/.config/awesome/xinput-daemon.sh index 3ede3fc..4976b5f 100755 --- a/.config/awesome/xinput-daemon.sh +++ b/.config/awesome/xinput-daemon.sh @@ -2,12 +2,12 @@ # Function to apply the desired settings apply_settings() { - 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 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 + 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 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 } # Initial application of settings @@ -15,15 +15,15 @@ apply_settings # Continuously monitor for changes in USB devices and reapply settings if any change is detected while true; do - # Get the current state of USB devices - state=$(lsusb) - - # Wait for 2 seconds - sleep 2 - - # Compare the current state with the new state of USB devices - # If any change is detected, reapply the settings - if [ "$state" != "$(lsusb)" ]; then - apply_settings - fi + # Get the current state of USB devices + state=$(lsusb) + + # Wait for 2 seconds + sleep 2 + + # Compare the current state with the new state of USB devices + # If any change is detected, reapply the settings + if [ "$state" != "$(lsusb)" ]; then + apply_settings + fi done |
