Skip to content

Instantly share code, notes, and snippets.

@zwhitchcox
Created March 4, 2023 01:30
Show Gist options
  • Save zwhitchcox/0fa8ec54671720fa3d2e79b2fd4a81d8 to your computer and use it in GitHub Desktop.
Save zwhitchcox/0fa8ec54671720fa3d2e79b2fd4a81d8 to your computer and use it in GitHub Desktop.
set up wacom tablet using udev rules
#!/usr/bin/env bash
sudo -i -u zwhitchcox xsetwacom set 'Wacom Intuos4 4x6 Pen stylus' button 3 '0'
# make sure to chmod this script with `chmod +x /home/zwhitchcox/.xsetwacom`
# /etc/udev/rules.d/99-wacom.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00b8", TAG+="systemd", ENV{SYSTEMD_WANTS}="wacom.service"
# /etc/systemd/system/wacom.service
[Unit]
Description=Set Wacom tablet button 3 to 0
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/home/zwhitchcox/.xsetwacom
User=zwhitchcox
Environment=DISPLAY=:1
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment