Skip to content

Instantly share code, notes, and snippets.

@sizmailov
Created May 3, 2020 22:57
Show Gist options
  • Save sizmailov/9bf1c076f8a738ad39db4e6f259d41ed to your computer and use it in GitHub Desktop.
Save sizmailov/9bf1c076f8a738ad39db4e6f259d41ed to your computer and use it in GitHub Desktop.
Change resolution on wacom connect
ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="56a/37a/100", RUN=="/bin/su sergei --command='/home/sergei/bin/on-wacom-add.sh'"
ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="56a/37a/100", RUN=="/bin/su sergei --command='/home/sergei/bin/on-wacom-remove.sh'"

Repalce sergei by user name Replace value of ENV{PRODUCT}=="56a/37a/100" based on output of udevadm monitor --kernel --property --subsystem-match=usb (connect/disconnect tablet to trigger actions)

Restart udev: service udev restart

#!/bin/bash
export DISPLAY=:0
export XAUTHORITY=$HOME/.Xauthority
xrandr --output DVI-D-0 --mode 1920x1080
#!/bin/bash
export DISPLAY=:0
export XAUTHORITY=$HOME/.Xauthority
xrandr --output DVI-D-0 --mode 2560x1080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment