mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-01-30 09:48:11 +01:00
Improve remapd detection
Previously remapd would trigger whenever a USB device was attached. This patch changes that to only trigger the script when the output of `xinput --list` changes. This has the added bonus of making the script posix compliant.
This commit is contained in:
parent
0795202675
commit
ad9f509871
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# Rerun the remaps script whenever a new input device is added.
|
||||
|
||||
while :; do
|
||||
remaps
|
||||
grep -qP -m1 '[^un]bind.+\/[^:]+\(usb\)' <(udevadm monitor -u -t seat -s input -s usb)
|
||||
watch -n1 -g xinput --list
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user