Created
June 21, 2011 15:03
-
-
Save arowla/1038041 to your computer and use it in GitHub Desktop.
Pomodoro timer
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
# From http://navaneethkn.wordpress.com/2010/12/19/simple-egg-timer-on-linux-for-pomodoro-technique/ | |
#!/bin/bash | |
counter=0 | |
limit=$1 | |
summary=$2 | |
startmessage=$3 | |
endmessage=$4 | |
notify-send -u critical -i appointment -t 600 "$summary" "$startmessage" | |
echo | |
while [ $counter != $limit ]; do | |
echo "$counter minutes so far..."; | |
sleep 60 | |
counter=$(( $counter + 1 )) | |
done | |
if [ $counter = $limit ]; then | |
echo | |
notify-send -u critical -i appointment "$summary" "$endmessage" | |
echo -e '\a' >&2 | |
exit 0 | |
fi | |
# to invoke... | |
# alias begin-pomodoro='sh ~/bin/p-timer.sh 25 "Pomodoro" "Pomodoro started, you have 25 minutes left" "Pomodoro ended. Please stop working and take a short break"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment