Created
May 19, 2015 09:43
-
-
Save W4RH4WK/6c1b0643a2a11a8c198c to your computer and use it in GitHub Desktop.
rotate screen every second
This file contains hidden or 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 | |
while true; do | |
x=$(date "+%s") | |
x=$(( $x % 360 )) | |
pi=`echo "4*a(1)" | bc -l` | |
xrad=`echo "$x*($pi/180)" | bc -l` | |
sinx=`echo "s($xrad)" | bc -l` | |
sinx2=`echo "- s($xrad)" | bc -l` | |
cosx=`echo "c($xrad)" | bc -l` | |
xrandr --output VGA1 --transform $cosx,$sinx2,0,$sinx,$cosx,0,0,0,1 | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment