QUOTE(rrnwexec @ Jan 9 2006, 09:38 AM)
Hello,
In beta1, the Rotate function rotates the screen from portrait mode to landscape by rotating by -90 degrees (i.e. 90 degrees counterclockwise).
How can I make the rotation +90 degrees (i.e. 90 degrees clockwise)?** Why would I want to do this? The IR port on the 6000 needs to be facing the IR port on my mini keyboard. Using the standard rotation, this is not possible.
Thanks in advance,
Randall.
This is rotate.sh from my /usr/bin directory
QUOTE
#!/bin/sh
ROTA=`xrandr | grep 'Current rotation' | sed -e 's/Current rotation\ \-\ //g'`
case "$ROTA" in
normal)
xrandr -o right
;;
left)
xrandr -o normal
;;
right)
xrandr -o normal
;;
inverted)
xrandr -o normal
;;
esac
This one does all 4 orientations
QUOTE
#!/bin/sh
ROTA=`xrandr | grep 'Current rotation' | sed -e 's/Current rotation\ \-\ //g'`
case "$ROTA" in
normal)
xrandr -o left
;;
left)
xrandr -o inverted
;;
right)
xrandr -o normal
;;
inverted)
xrandr -o right
;;
esac
#
It's pretty straightforward. It gets teh orientation as it is now and calls it ROTA
It then compares ROTA to one of four different allowable values.
When it finds a match it executes the command under that match.
So the second one just rotates all four orientations one after the other, once every time you run it. The first one puts it to only normal or right no matter where it was when it started.