snailed ad9f509871
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.
2023-12-13 14:27:38 +01:00

9 lines
129 B
Bash
Executable File

#!/bin/sh
# Rerun the remaps script whenever a new input device is added.
while :; do
remaps
watch -n1 -g xinput --list
done