Skip to content

Instantly share code, notes, and snippets.

@Miura55
Created January 3, 2022 12:25
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 Miura55/810f05eff8af415890fd4b07fd5cdc63 to your computer and use it in GitHub Desktop.
Save Miura55/810f05eff8af415890fd4b07fd5cdc63 to your computer and use it in GitHub Desktop.
Rotate display script for Ubuntu tablet
#!/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