udev: Add xprofile-udevinput-monitor
[shutils.git] / udev / input / xprofile-udevinput-monitor
diff --git a/udev/input/xprofile-udevinput-monitor b/udev/input/xprofile-udevinput-monitor
new file mode 100755 (executable)
index 0000000..e48d1ac
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+# For each add-event of input subsystem by udev call ~/.xprofile-keyboard
+udevadm monitor -u -s input | grep --line-buffered add | while read line; do
+       echo ">> $line";
+       sh ~/.xprofile-udevinput
+done
+