diff --git a/rotate-touchscreen.sh b/rotate-touchscreen.sh index dc9e63a..f930af5 100755 --- a/rotate-touchscreen.sh +++ b/rotate-touchscreen.sh @@ -10,10 +10,13 @@ fi function do_rotate { - logger "rotate-touchscreen.sh: Changing rotation to $2" +# replace occurrences of 'bottom' from monitor-sensor with 'inverted' +# as required by xrandr + ROTATE=${2/bottom/inverted} + logger "rotate-touchscreen.sh: Changing rotation to $ROTATE" # disable screen rotate, just want to rotate touchpad # screen rotation already works in ubuntu -# xrandr --output $1 --rotate $2 +# xrandr --output $1 --rotate $ROTATE TRANSFORM='Coordinate Transformation Matrix' @@ -55,4 +58,4 @@ if [ "$XDISPLAY" == "" ] || [ "$XDISPLAY" == " " ] ; then XDISPLAY=`xrandr --current | grep connected | sed -e 's/ .*//g' | head -1` fi -do_rotate $XDISPLAY $1 \ No newline at end of file +do_rotate $XDISPLAY $1