Last active
February 16, 2016 04:08
-
-
Save jelera/e6270fa3b9ee8905387a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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