From 85f7adc36e978779b464e707b046ee31af1954c9 Mon Sep 17 00:00:00 2001 From: DuckDuckWhale Date: Sat, 24 Oct 2020 21:08:48 -0700 Subject: [PATCH] udev: add logging and polish HID script --- udev/lock-screen-on-hid-connection.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev/lock-screen-on-hid-connection.sh b/udev/lock-screen-on-hid-connection.sh index 24c089a..067329f 100755 --- a/udev/lock-screen-on-hid-connection.sh +++ b/udev/lock-screen-on-hid-connection.sh @@ -1,3 +1,3 @@ #!/bin/sh -echo 'SUBSYSTEM=="usb", DRIVER=="usbhid", RUN+="/usr/bin/loginctl lock-sessions"' | sudo tee /etc/udev/rules.d/00-usbhid-lock-screen.rules +echo 'ACTION=="add", SUBSYSTEM=="usb", DRIVER=="usbhid", RUN+="/usr/bin/loginctl lock-sessions", RUN+="/usr/bin/logger New USB HID device found, locking sessions"' | sudo tee /etc/udev/rules.d/00-usbhid-lock-screen.rules >> /dev/null sudo systemctl reload udev