Skip to content

Instantly share code, notes, and snippets.

@Ortuna
Created July 6, 2014 13:33
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 Ortuna/527a1bb8c7c579088f1a to your computer and use it in GitHub Desktop.
Save Ortuna/527a1bb8c7c579088f1a to your computer and use it in GitHub Desktop.
Lenovo Yoga 11s Screen rotation
#!/bin/bash
rotation=$(xrandr -q --verbose|grep eDP1 |grep -oh ") .* (" | grep -o "\w.*\w")
if [ $rotation = 'normal' ]
then
xrandr -o right
elif [ $rotation = 'right' ]
then
xrandr -o inverted
elif [ $rotation = 'inverted' ]
then
xrandr -o left
else
xrandr -o normal
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment