Created
January 3, 2022 12:25
-
-
Save Miura55/810f05eff8af415890fd4b07fd5cdc63 to your computer and use it in GitHub Desktop.
Rotate display script for Ubuntu tablet
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 | |
rotation=$(xrandr -q --verbose|grep DSI-1|egrep -o "(normal|left)"|head -1) | |
if [ "$rotation" = "normal" ];then | |
xrandr --output DSI-1 --rotate left | |
else | |
xrandr --output DSI-1 --rotate normal | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment