summaryrefslogtreecommitdiffstats
path: root/bin/hornet/watch-kbd
blob: cbb38243dbdd19647b182e7b91bcade68a499bd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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