Created
October 27, 2009 18:58
-
-
Save rogerleite/219825 to your computer and use it in GitHub Desktop.
Simple timer for Pomodoro Technique in shell script
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/bash | |
# http://www.pomodorotechnique.com/ | |
#Icones: | |
#/usr/share/icons/hicolor/48x48/apps/typing-monitor.png | |
#/usr/share/icons/hicolor/48x48/apps/evolution-tasks.png | |
#Requisitos: | |
#sudo apt-get install beep | |
#sudo apt-get install libnotify-bin | |
echo "`date` Pomodoro session, started!" | |
minutes_remaining=25 | |
for (( i = 0; i <= 4; i++)) do | |
minutes=$((60 * 5)) | |
sleep $minutes | |
minutes_remaining=$(($minutes_remaining - 5)) | |
echo "`date` Remaining $minutes_remaining minutes ..." | |
if [ $minutes_remaining -eq 5 ]; then | |
notify-send "PomodoroSession" "Remaining $minutes_remaining minutes ..." -i /usr/share/icons/hicolor/48x48/apps/evolution-tasks.png | |
beep | |
fi | |
done | |
notify-send "PomodoroSession" "Session is Over! Take a break of 5 minutes." -i /usr/share/icons/hicolor/48x48/apps/typing-monitor.png | |
beep |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment