Skip to content

Instantly share code, notes, and snippets.

@th0rex
Last active June 29, 2022 18:26
Show Gist options
  • Save th0rex/6134b19faeb155d7de8116050a262104 to your computer and use it in GitHub Desktop.
Save th0rex/6134b19faeb155d7de8116050a262104 to your computer and use it in GitHub Desktop.
ACTION=="add", SUBSYSTEM=="input", ENV{ID_VENDOR_ENC}=="Logitech", ENV{ID_INPUT_KEYBOARD}=="1", RUN+="/bin/sh -c 'sudo -u user DISPLAY=:0 XAUTHORITY=/home/user/.Xauthority DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus /usr/bin/notify-send -u critical \"foo\"'"
@th0rex
Copy link
Author

th0rex commented Jun 29, 2022

udevadm monitor -u
doas udevadm control --reload

@th0rex
Copy link
Author

th0rex commented Jun 29, 2022

doas lsusb -v | rg 'bInterfaceProtocol 1 Keyboard' | wc -l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment