Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions rotate-touchscreen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -55,4 +58,4 @@ if [ "$XDISPLAY" == "" ] || [ "$XDISPLAY" == " " ] ; then
XDISPLAY=`xrandr --current | grep connected | sed -e 's/ .*//g' | head -1`
fi

do_rotate $XDISPLAY $1
do_rotate $XDISPLAY $1