Created
November 23, 2012 03:22
-
-
Save rxw1/4133872 to your computer and use it in GitHub Desktop.
Reminds you to do your work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Fri Nov 23 03:17:47 CET 2012 | |
# https://gist.github.com/4133872 | |
# Copyright 2012 (C) René Wilhelm <[email protected]> | |
# Use at your own risk. | |
# A simple timer to remind you to do your work and do something else in given | |
# intervals. Somewhere else these kind of reminders are known as pomodoro | |
# anti-procrastination (whatever) timers. In addition to this you could put | |
# festivals saytime into your crontab. See below. | |
# Put the following lines into your ~/.festivalrc. Be sure to have festival and | |
# the appropiate voice installed. | |
# | |
# (set! voice_default 'voice_cmu_us_slt_arctic_hts) | |
# (Parameter.set 'Audio_Method 'Audio_Command) | |
# (Parameter.set 'Audio_Command "aplay -q -c 1 -t raw -f s16 -r $SR $FILE") | |
# (set! default_after_synth_hooks | |
# (list (lambda (utt) (utt.wave.rescale utt 1.6 t)))) | |
# The next makes a great crontab companion: | |
# */15 1-8 * * * /usr/bin/saytime | |
# To update the gist: | |
# jist -u 4133872 -f wp.sh =wp | |
# Too many comments. | |
if [[ ! $#@ == 2 ]]; then | |
echo "Usage: $0 <work minutes> <play minutes>" | |
return | |
fi | |
while true; do | |
echo work $1 minutes | festival --tts | |
sleep $(($1*60)) | |
echo play $2 minutes | festival --tts | |
sleep $(($2*60)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment