Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple timer for Pomodoro Technique in shell script
#!/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