A collection of Pomodoro Timer applications built with Python and Tkinter, ranging from a basic implementation to modern, feature-rich versions with advanced UI.
This repository contains three versions of the Pomodoro Timer technique implementation:
- Basic Pomodoro (
basic_pomodoro.py) - Original implementation from Angela Yu's 100 Days of Code course - Enhanced Pomodoro (
enhanced_pomodoro.py) - Added pause/resume and time customization features - Modern Pomodoro (
modern_pomodoro.py) - Complete redesign with ttkbootstrap, notifications, and sliders
| Feature | Basic | Enhanced | Modern |
|---|---|---|---|
| Work/Break Timer | β | β | β |
| Visual Checkmarks | β | β | β |
| Pause/Resume | β | β | β |
| Time Customization | β | β (Buttons) | β (Sliders) |
| Modern UI | β | β | β |
| Progress Bar | β | β | β |
| Notifications | β | β | β |
| Responsive Design | β | β | β |
- Python 3.7 or higher
- tkinter (usually comes with Python)
- ttkbootstrap (for modern version only)
- Clone the repository:
git clone https://github.com/yourusername/pomodoro-timer.git
cd pomodoro-timer- Install dependencies (for modern version):
pip install -r requirements.txt- Make sure you have
tomato.pngin the same directory
Basic Version:
python basic_pomodoro.pyEnhanced Version:
python enhanced_pomodoro.pyModern Version:
python modern_pomodoro.pyKey Components:
- Timer Mechanism: Uses
window.after()for non-blocking countdown - Pomodoro Cycle:
- Work sessions (25 min default)
- Short breaks (5 min) after each work session
- Long break (20 min) after 4 work sessions
- Visual Feedback: Checkmarks (β) accumulate after each work session
- Color Coding: Different colors for work (green), short break (pink), long break (red)
Core Functions:
start_timer() # Initiates the pomodoro cycle
count_down() # Recursive countdown mechanism
reset_timer() # Resets everything to initial stateNew Features:
- Pause/Resume Functionality:
- Saves current time when paused
- Resumes from saved position
- Button text changes dynamically
- Time Customization:
- Plus/minus buttons for work duration (1-60 min)
- Plus/minus buttons for break duration (1-30 min)
- Adjustments disabled during active session
- State Management: Tracks
is_pausedandremaining_timeglobally
Additional Functions:
pause_timer() # Pauses the current session
resume_timer() # Resumes from paused state
adjust_work_time() # Modifies work duration
adjust_break_time() # Modifies break durationState Flow:
Initial β Start (buttons disabled) β Pause β Resume β Complete
β β
βββββββββββββ Reset ββββββββββββββββββββββββββββββββββ
Major Enhancements:
-
ttkbootstrap Integration:
- Modern, flat design with "flatly" theme
- Consistent styling with bootstrap-inspired components
- Better color schemes and visual hierarchy
-
UI Components:
- Sliders: Smooth range selection (1-60 min work, 1-30 min break)
- Progress Bar: Visual representation of time remaining
- Labelframes: Organized settings sections
- Emojis: Enhanced visual communication (π πΌ β π)
-
Advanced Features:
- Toast Notifications: Desktop notifications for session changes
- Scrollable Interface: Accommodates all controls without crowding
- Mouse Wheel Support: Scroll through settings easily
- Dynamic Long Break: Automatically 4x the short break duration
-
Improved UX:
- Real-time slider updates with value display
- Disabled states are more visually obvious
- Better spacing and padding throughout
- Fallback handling if tomato.png is missing
Key Technical Improvements:
# Progress bar calculation
progress = ((total_time - count) / total_time) * 100
progress_bar['value'] = progress
# Scrollable canvas for responsive design
canvas_container = Canvas(window, highlightthickness=0)
scrollbar = ttk.Scrollbar(window, orient="vertical")
scrollable_frame = ttk.Frame(canvas_container)
# Notification system
toast = ToastNotification(
title=title,
message=message,
duration=3000,
bootstyle=INFO
)Architecture Pattern:
- Separation of Concerns: Settings, timer, and controls are visually separated
- Event-Driven: All interactions trigger callbacks
- Graceful Degradation: Works even if notifications fail or image is missing
The Pomodoro Technique is a time management method:
- Work for 25 minutes (1 Pomodoro)
- Take a 5-minute break
- After 4 Pomodoros, take a longer 15-20 minute break
This technique helps maintain focus and prevent burnout.
- Python 3.x
- Tkinter: Standard Python GUI framework
- ttkbootstrap: Modern themed widgets for Tkinter
- Math module: For time calculations
- Basic implementation inspired by Angela Yu's 100 Days of Code: Python Course
- Enhanced and modernized by Hossein Mosaffa
- Pomodoro Technique developed by Francesco Cirillo
This project is open source and available under the MIT License.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
Hossein Mosaffa - LΔ°NKEDΔ°N
Project Link: https://github.com/Hosseinm2018/pomodoro-timer
β If you found this helpful, please give it a star!



