🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101

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. 1

    Digital clock

    A Label updated every second with time.strftime("%H:%M:%S") using root.after(1000, tick).

  2. 2

    Alarms

    Keep a list of "HH:MM" strings; in tick(), if now matches one, show a popup and play a sound.

  3. 3

    Why not sleep

    Never call time.sleep in a Tkinter app; it freezes the window. Always schedule with after().

  4. 4

    Pomodoro state

    Track mode ("work"/"break"), seconds_left and running; a countdown function calls itself with after(1000).

  5. 5

    Switch modes

    When work hits 0, increase sessions, switch to a 5-minute break (15 minutes after every 4th session).

  6. 6

    Sound

    On Windows use winsound.Beep; elsewhere print("\a") or pip install playsound.

  7. 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