Created
April 16, 2021 12:43
-
-
Save sainak/ad0c88a6183fdd3c2c610252d1df986a to your computer and use it in GitHub Desktop.
a script to rotate screen by 180 degrees on linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Location for file to save rotation state | |
TOGGLE=/tmp/.toggle | |
if [ ! -e $TOGGLE ]; then | |
touch $TOGGLE | |
xrandr -o inverted | |
else | |
rm $TOGGLE | |
xrandr -o normal | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment