pomodoro
pomodoro copied to clipboard
Background and closing
In my brief testing, if you close the window, this will fail. You must first disown it and even then, you need to close with exit
rather than ctrl+w (or q)
I do not know how it would work for such a big function, but you inspired me to write my own mac specific smaller version as follows:
timer() {
if [ -z "$1" ]; then echo "No set time. Setting for 25 minutes"; t=25; else echo "Timer set for $1 minutes";t=$1; fi
ttime=`bc <<< 60*$t`;
(nohup nice sleep $ttime && terminal-notifier -message 'Timer Finished: '$t' minutes' -title 'Timer' --subtitle 'Timers up!' && say -v bells "beep" &) > /dev/null 2>&1 ;
}
alias pom='timer'
The ( )
makes it launch a subprocess and nohup
makes it in the background. Also nice
is there but not really needed for a sleep command.
edit: Cleaned up the code I suggested
Thanks, I was busy with my daily commitments to work on that, thanks for mentioning it. Will you be interested in making a pull request to the repository? so this feature will be added. Looking forward to it. :)