summaryrefslogtreecommitdiffstats
path: root/.local/bin/remapd
diff options
context:
space:
mode:
authorLuca Bilke <luca@gmail.com>2023-02-09 17:11:16 +0100
committerLuca Bilke <luca@gmail.com>2023-02-09 17:11:16 +0100
commit457539c043cc8645eb75e92ff6b0f31182b114d7 (patch)
treefb9630427156f37e7c62df77532b3ff1654a1337 /.local/bin/remapd
parentec1914e0b96c7b85be2197289e45852f08b95579 (diff)
downloadeibhear-457539c043cc8645eb75e92ff6b0f31182b114d7.tar.gz
eibhear-457539c043cc8645eb75e92ff6b0f31182b114d7.tar.zst
eibhear-457539c043cc8645eb75e92ff6b0f31182b114d7.zip
remove complexity
Diffstat (limited to '.local/bin/remapd')
-rwxr-xr-x.local/bin/remapd7
1 files changed, 3 insertions, 4 deletions
diff --git a/.local/bin/remapd b/.local/bin/remapd
index 2d87eae..14ae239 100755
--- a/.local/bin/remapd
+++ b/.local/bin/remapd
@@ -2,10 +2,9 @@
# Rerun the remaps script whenever a new input device is added.
-trap "rm -f /tmp/udev_pipe; exit" HUP INT QUIT ILL TRAP BUS TERM
-mkfifo -m 600 /tmp/udev_pipe
-udevadm monitor -u -t seat -s input -s usb >>/tmp/udev_pipe &
while :; do
- grep -q "add" /tmp/udev_pipe && grep -q " bind" /tmp/udev_pipe
+ udevadm monitor -u -t seat -s input -s usb | grep --line-buffer -m1 -P '[^un]bind'
+ sleep 1
remaps us:dvorak
done
+