Hi everyone! So, I just installed Ubuntu on my new X220 tablet and I wanted to share a little script that I worked on to make rotation work with the computer, because by default when you rotate the screen orientation the pen, eraser and touch inputs do not rotate as well. So, with this simple script, the screen rotates to the left from default upon clicking it (I'm left-handed; figure it out if you're right-handed) and then back to normal from the left. I did some research in creating the script, but I forgot from where...
Anyways! Put this in a file blah.sh anywhere, and do whatever you want with it! I pinned it to the taskbar thingy in Ubuntu:
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"
# Using current screen orientation proceed to rotate screen and input tools.
case "$rotation" in
# rotate to the left
xrandr -o left
xsetwacom set "Wacom ISDv4 E6 Pen stylus" rotate ccw
xsetwacom set "Wacom ISDv4 E6 Finger touch" rotate ccw
xsetwacom set "Wacom ISDv4 E6 Pen eraser" rotate ccw
# rotate to normal
xrandr -o normal
xsetwacom set "Wacom ISDv4 E6 Pen stylus" rotate none
xsetwacom set "Wacom ISDv4 E6 Finger touch" rotate none
xsetwacom set "Wacom ISDv4 E6 Pen eraser" rotate none
Lastly... To pin to the taskbar takes a little skill. Find a icon online that you want (svg works) and follow this guide to pin it to the Unity bar:http://itshouldbeuseful.wordpress.com/2 ... ntu-11-04/
Good luck! Hope this helped someone... I didn't look to see if something like this had been posted before. If anyone can get it to run when you press the dedicated rotate button, please let me know!
My Unity screenshot: http://lookpic.com/O/i2/956/Zf0xHxN.png
SVG rotate icon: http://www.clker.com/clipart-rotate-ccw-icon.html
EDIT:: Check out this Github installation using this script and some other cool things made by "the undecided":https://github.com/martin-ueding/think-rotate