Skip to content

Instantly share code, notes, and snippets.

@kalkin
Created December 28, 2014 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalkin/ef0b0fa656eb298be4b0 to your computer and use it in GitHub Desktop.
Save kalkin/ef0b0fa656eb298be4b0 to your computer and use it in GitHub Desktop.
Thinkpad X220 Centos 7 Rotate Script
case $(xrandr|grep LVDS|sed -e 's/(.*$//'|cut -d" " -f5) in
"") # Screen is not rotated, we should rotate it right (90°)
xrandr -o 3
;;
*) # screen is rotated, we should set it normal (0°)
xrandr -o 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment