#! /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
    onboard &
else
    /usr/bin/X11/xrandr --orientation normal
    xsetwacom set stylus rotate
    killall onboard
fi
