-
Notifications
You must be signed in to change notification settings - Fork 0
/
90-tablet.rules
12 lines (9 loc) · 1.12 KB
/
90-tablet.rules
1
2
3
4
5
6
7
8
9
10
11
12
# set rule, reload udev rules and then trigger:
# sudo udevadm control --reload
# sudo udevadm trigger --verbose --action=add --attr-match="name=Logitech G502 HERO Gaming Mouse"
#ACTION=="add", ATTRS{name}=="Logitech G502 HERO Gaming Mouse", ENV{XAUTHORITY}="/home/linus/.Xauthority", ENV{DISPLAY}=":0", ENV{DBUS_SESSION_BUS_ADDRESS}="unix:path=/run/user/1000/bus", RUN+="/usr/bin/su linus -c '/usr/bin/notify-send working'"
#send dnotify message when screen gets connected
#ACTION=="change", KERNEL=="card0", SUBSYSTEM=="drm", ENV{XAUTHORITY}="/home/linus/.Xauthority", ENV{DISPLAY}=":0", ENV{DBUS_SESSION_BUS_ADDRESS}="unix:path=/run/user/1000/bus", RUN+="/usr/bin/su linus -c '/usr/bin/notify-send working screen!!!'"
# ln -s /home/linus/useful_scripts/90-tablet.rules /etc/udev/rules.d/90-tablet.rules
#run script to enable/disable screen
ACTION=="add", KERNEL=="js0", SUBSYSTEM=="input", ATTRS{id/product}=="006e", ATTRS{id/vendor}=="256c", ,ENV{XAUTHORITY}="/home/linus/.Xauthority", ENV{DISPLAY}=":0", ENV{DBUS_SESSION_BUS_ADDRESS}="unix:path=/run/user/1000/bus", RUN+="/usr/bin/su linus -c '/usr/bin/sh $USEFUL_SCRIPTS/.xsetwacom.sh'"