Alarm clock and Pomodoro timer
A desktop clock with alarms and a Pomodoro focus timer (25 minutes work, 5 minutes break) with session stats.
Beginnerâą 3â5 hoursđĒ 7 stepsPythonTkinter
What you'll learn
- âTimers with after() instead of sleep
- âManaging app state
- âPlaying sounds and notifications
What you'll build
- âLive digital clock
- âSet multiple alarms
- âPomodoro with start, pause and reset
- âCounts focus sessions per day
Step-by-step guide
- 1
Digital clock
A Label updated every second with time.strftime("%H:%M:%S") using root.after(1000, tick).
- 2
Alarms
Keep a list of "HH:MM" strings; in tick(), if now matches one, show a popup and play a sound.
- 3
Why not sleep
Never call time.sleep in a Tkinter app; it freezes the window. Always schedule with after().
- 4
Pomodoro state
Track mode ("work"/"break"), seconds_left and running; a countdown function calls itself with after(1000).
- 5
Switch modes
When work hits 0, increase sessions, switch to a 5-minute break (15 minutes after every 4th session).
- 6
Sound
On Windows use winsound.Beep; elsewhere print("\a") or pip install playsound.
- 7
Save stats
Store sessions per date in stats.json and show today's count.
đ Make it stand out
- +Task list linked to each Pomodoro
- +Weekly focus chart with matplotlib
- +Minimise to system tray