summaryrefslogtreecommitdiffstats
path: root/bin/hornet/watch-kbd
diff options
context:
space:
mode:
Diffstat (limited to 'bin/hornet/watch-kbd')
-rwxr-xr-xbin/hornet/watch-kbd11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/hornet/watch-kbd b/bin/hornet/watch-kbd
new file mode 100755
index 0000000..cbb3824
--- /dev/null
+++ b/bin/hornet/watch-kbd
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -eu
+set -o pipefail
+
+inotifywait -mq -e create -e delete --exclude '.*tmp.*' /dev/input/by-id/ | \
+ while read -r event; do
+ echo "$event"
+ if echo "$event" | grep -q USB_Keyboard; then
+ setup-inputs
+ fi
+ done