Tuesday, June 7, 2011

Rotating WeTab Screen on Natty Narwhal

So the rotation bit turned out to be simpler than I had thought and thanks to the following link: https://wiki.ubuntu.com/X/InputCoordinateTransformation I've gotten it working.

So as before I have two scripts: rot.sh and norm.sh

rot.sh looks like this:

xinput set-prop 9 --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
xrandr -o left

norm.sh looks like this:

xinput set-prop 9 --type=float "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
xrandr -o normal

If I were awake in Linear Algebra class I would probably have realized the solution a lot earlier. In any case the first line basically represents something like the following matrix which in essence rotates the coordinate system by 90 degrees to the left. The details slip me at present but I'm sure I'll dream of matrices tonight...

0 -1 1
1  0  0   
0  0  1

Alrighty, over and out!

5 comments:

  1. Hello Etheros,

    Can you tell me how to do this on a clean 11.04 istallation and to make rotation work?

    ReplyDelete
  2. Did you try the commands above in a shell window? That should be all. I just put those in two seperate sh files and put shortcuts on a panel so I can rotate back and forth.

    ReplyDelete
  3. Hi Etheros, thanks again, this is cool :)
    I haven't been able to find right click yet. You got any hints to that? Cheers.

    ReplyDelete
  4. Hey! Well, I'm using twofing as explained in one of my earlier posts, all you have to do is tap with both fingers...

    ReplyDelete