2020-02-12 15:52:08 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2020-02-12 16:00:17 -07:00
|
|
|
# rotate screen clockwise in a complete circle once
|
2020-02-12 15:52:08 -07:00
|
|
|
# by Justin Oros
|
|
|
|
|
|
|
|
|
|
myScreenTypes="VGA HDMI DP eDP"
|
|
|
|
|
myScreenRotations="normal right inverted left normal"
|
|
|
|
|
myScreenNum=1
|
|
|
|
|
mySleepTime=3
|
|
|
|
|
myDisplay=:0
|
|
|
|
|
|
|
|
|
|
rotate() {
|
|
|
|
|
export DISPLAY=$myDisplay
|
|
|
|
|
for myScreenRotation in $myScreenRotations
|
|
|
|
|
do
|
|
|
|
|
for myScreenType in $myScreenTypes
|
|
|
|
|
do
|
|
|
|
|
xrandr --output $myScreenType-$myScreenNum --rotate $myScreenRotation > /dev/null 2>&1
|
|
|
|
|
sleep $mySleepTime
|
|
|
|
|
done
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
rotate
|