diff options
author | Jesse Luehrs <doy@tozt.net> | 2023-10-08 12:09:20 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2023-10-08 12:59:10 -0400 |
commit | 49570c8dd03448240897b37b68567352b790f16f (patch) | |
tree | 6c192a52046d5d0dd1b84a838befd8e777cfeafb /local/.bin/hornet/watch-kbd | |
parent | 66939c71da756c1d9e07a88a4a8ea2a018650060 (diff) | |
download | conf-49570c8dd03448240897b37b68567352b790f16f.tar.gz conf-49570c8dd03448240897b37b68567352b790f16f.zip |
convert to stow
Diffstat (limited to 'local/.bin/hornet/watch-kbd')
-rwxr-xr-x | local/.bin/hornet/watch-kbd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/local/.bin/hornet/watch-kbd b/local/.bin/hornet/watch-kbd new file mode 100755 index 0000000..a4d504e --- /dev/null +++ b/local/.bin/hornet/watch-kbd @@ -0,0 +1,14 @@ +#!/bin/bash +set -eu +set -o pipefail + +trap 'kill $(jobs -p)' EXIT + +inotifywait -mq -e create -e delete -e moved_to --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 & +wait |