#!/bin/sh i=11 sync while true do i=$((i-1)) if [ $i -eq 0 ] then sync autorandr -c exit 0 fi echo $i sleep 1 done