Skip to content

Instantly share code, notes, and snippets.

@W4RH4WK
Created May 19, 2015 09:43
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 W4RH4WK/6c1b0643a2a11a8c198c to your computer and use it in GitHub Desktop.
Save W4RH4WK/6c1b0643a2a11a8c198c to your computer and use it in GitHub Desktop.
rotate screen every second
#!/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