#Screen Rotation Script by aliencam (http://aliencam.net) #This script will only work if your Xserver has the correct tablet device names #follow the guide on http://blog.aliencam.net/articles/ubuntu-9-04-setup-guide/ #! /bin/sh orientation=`xrandr -q | grep "LVDS"| awk '{print $4}' | sed 's/[^A-Za-z]//g'` if [ "$orientation" = "normal" ]; then /usr/bin/X11/xrandr --orientation right xsetwacom set stylus rotate CW else if [ "$orientation" = "right" ]; then /usr/bin/X11/xrandr --orientation inverted xsetwacom set stylus rotate 3 else if [ "$orientation" = "inverted" ]; then /usr/bin/X11/xrandr --orientation left xsetwacom set stylus rotate CCW else if [ "$orientation" = "left" ]; then /usr/bin/X11/xrandr --orientation normal xsetwacom set stylus rotate else /usr/bin/X11/xrandr --orientation normal xsetwacom set stylus rotate fi fi fi fi