~fultonbrowne/rc-scripts

ref: 1548cc3d3364e742e401026593c24123c7b17457 rc-scripts/util/pomodoro -rwxr-xr-x 336 bytes
1548cc3d — glenda added yet another handy script 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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
}