diff options
-rwxr-xr-x | bin/hush/watch-kbd | 11 | ||||
-rwxr-xr-x | services/available/watch-kbd/log/run | 3 | ||||
-rwxr-xr-x | services/available/watch-kbd/run | 5 |
3 files changed, 19 insertions, 0 deletions
diff --git a/bin/hush/watch-kbd b/bin/hush/watch-kbd new file mode 100755 index 0000000..cbb3824 --- /dev/null +++ b/bin/hush/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 diff --git a/services/available/watch-kbd/log/run b/services/available/watch-kbd/log/run new file mode 100755 index 0000000..41c1a23 --- /dev/null +++ b/services/available/watch-kbd/log/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec multilog t s16777215 $HOME/.log/watch-kbd diff --git a/services/available/watch-kbd/run b/services/available/watch-kbd/run new file mode 100755 index 0000000..10816ec --- /dev/null +++ b/services/available/watch-kbd/run @@ -0,0 +1,5 @@ +#!/bin/sh +set -eu +set -o pipefail + +exec watch-kbd |