Skip to content

Instantly share code, notes, and snippets.

@mmaz
Created June 21, 2011 21:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmaz/1038968 to your computer and use it in GitHub Desktop.
Save mmaz/1038968 to your computer and use it in GitHub Desktop.
Rotate screen in Ubuntu for a Lenovo X60
#!/bin/bash
rotation=`xrandr --query --verbose | grep "LVDS1" | awk '{print $5}'`
if [ $rotation = "normal" ]
then
xsetwacom set "Serial Wacom Tablet stylus" Rotate half
xrandr -o inverted
else
xsetwacom set "Serial Wacom Tablet stylus" Rotate none
xrandr -o normal
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment