udev: add logging and polish HID script

This commit is contained in:
DuckDuckWhale 2020-10-24 21:08:48 -07:00
parent 62486926f6
commit 85f7adc36e
Signed by: DuckDuckWhale
GPG Key ID: E4B9FC170FFD71CE

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/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 sudo systemctl reload udev