Skip to content

Instantly share code, notes, and snippets.

@jelera
Last active February 16, 2016 04:08
Show Gist options
  • Save jelera/e6270fa3b9ee8905387a to your computer and use it in GitHub Desktop.
Save jelera/e6270fa3b9ee8905387a to your computer and use it in GitHub Desktop.
#!/bin/bash
# This script has been tested with:
# - Ubuntu Linux 14.04 LTS
# - Thinkpad X220 Tablet
if [ $(xrandr --dryrun | awk '/LVDS1 connected/ {print $5}') = "normal" ]; then
xrandr -o right
xsetwacom set "Wacom ISDv4 E6 Pen stylus" Rotate CW
xsetwacom set "Wacom ISDv6 E6 Finger touch" Rotate CW
xsetwacom set "Wacom ISDv4 E6 Pen eraser" Rotate CW
# xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" Rotate CW
else
xrandr -o normal
xsetwacom set "Wacom ISDv4 E6 Pen stylus" Rotate None
xsetwacom set "Wacom ISDv4 E6 Finger touch" Rotate None
xsetwacom set "Wacom ISDv4 E6 Pen eraser" Rotate None
# xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" Rotate None
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment