#!/bin/bash
# Won't work if the display is something other than 1024x768
# Won't rotate if external monitor is connected
orientation=`xrandr -q | grep -c 1024x768`
if [ $orientation -eq 2 ]; then
/usr/bin/X11/xrandr --orientation right
xsetwacom set "Serial Wacom Tablet" Rotate CW
xsetwacom set "Serial Wacom Tablet eraser" Rotate CW
else
/usr/bin/X11/xrandr --orientation normal
xsetwacom set "Serial Wacom Tablet" Rotate NONE
xsetwacom set "Serial Wacom Tablet eraser" Rotate NONE
fi
#!/bin/bash
# Remap the side button to bring up context menu.
xsetwacom set "Serial Wacom Tablet" Button1 "button 1"
xsetwacom set "Serial Wacom Tablet" Button2 "button 3"
# Fix the "Serial Wacom Tablet eraser" button to paste
xsetwacom set "Serial Wacom Tablet eraser" Button1 "button 2"