aboutsummaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorBlista Kanjo2023-06-17 00:32:34 -0400
committerBlista Kanjo2023-06-17 00:32:34 -0400
commit02dd0c7a37873a121b386fafc5201c06f7ea4461 (patch)
tree91d5840fc64c0d891678d59695d57500b6ae7c1c /.config
parent6766559bb10f173388211c47346de7fe314f1828 (diff)
refactor: removed comments, readable as-is
Diffstat (limited to '.config')
-rwxr-xr-x.config/awesome/xinput-daemon.sh8
1 files changed, 0 insertions, 8 deletions
diff --git a/.config/awesome/xinput-daemon.sh b/.config/awesome/xinput-daemon.sh
index 4976b5f..97ed7a8 100755
--- a/.config/awesome/xinput-daemon.sh
+++ b/.config/awesome/xinput-daemon.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-# Function to apply the desired settings
apply_settings() {
sleep 2
xinput set-prop pointer:"Logitech USB Trackball" "libinput Natural Scrolling Enabled" 1
@@ -10,19 +9,12 @@ apply_settings() {
xinput set-prop pointer:"Logitech M705" "libinput Accel Speed" 1.000000
}
-# Initial application of settings
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