shithub: 9scripts

ref: 40f690d9f406d75d64d4c0bcb93fe35f8c2531d2
dir: /util/pomodoro/

View raw version
#!/bin/rc
# usage pomodoro [worktime] [rest time]
# defaults to 25 and 5
wtimesec=25
rtimesec=5
if(~ $# 2){
	wtimesec=$1
	rtimesec=$2
}

wtime = `{echo $wtimesec * 60 | bc}
rtime = `{echo $rtimesec * 60 | bc}

echo running a pomodoro of $wtime and $rtime
while( ){
	echo GET TO WORK
	sleep $wtime
	echo You can now rest
	sleep $rtime
}