Skip to content

Latest commit

Β 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ… Pomodoro Timer - Enhanced Versions

A collection of Pomodoro Timer applications built with Python and Tkinter, ranging from a basic implementation to modern, feature-rich versions with advanced UI.

πŸ“‹ Overview

This repository contains three versions of the Pomodoro Timer technique implementation:

  1. Basic Pomodoro (basic_pomodoro.py) - Original implementation from Angela Yu's 100 Days of Code course
  2. Enhanced Pomodoro (enhanced_pomodoro.py) - Added pause/resume and time customization features
  3. Modern Pomodoro (modern_pomodoro.py) - Complete redesign with ttkbootstrap, notifications, and sliders

✨ Features Comparison

Feature Basic Enhanced Modern
Work/Break Timer βœ… βœ… βœ…
Visual Checkmarks βœ… βœ… βœ…
Pause/Resume ❌ βœ… βœ…
Time Customization ❌ βœ… (Buttons) βœ… (Sliders)
Modern UI ❌ ❌ βœ…
Progress Bar ❌ ❌ βœ…
Notifications ❌ ❌ βœ…
Responsive Design ❌ ❌ βœ…

πŸš€ Getting Started

Prerequisites

  • Python 3.7 or higher
  • tkinter (usually comes with Python)
  • ttkbootstrap (for modern version only)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/pomodoro-timer.git
cd pomodoro-timer
  1. Install dependencies (for modern version):
pip install -r requirements.txt
  1. Make sure you have tomato.png in the same directory

Running the Applications

Basic Version:

python basic_pomodoro.py

Enhanced Version:

python enhanced_pomodoro.py

Modern Version:

python modern_pomodoro.py

Screenshots

Basic Version Enhanced Version Modern Version Modern Version

πŸ“– Code Explanations

Basic Pomodoro (basic_pomodoro.py)

Key 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 state

Enhanced Pomodoro (enhanced_pomodoro.py)

New 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_paused and remaining_time globally

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 duration

State Flow:

Initial β†’ Start (buttons disabled) β†’ Pause β†’ Resume β†’ Complete
   ↓                                                      ↓
   ←←←←←←←←←←←←← Reset ←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←

Modern Pomodoro (modern_pomodoro.py)

Major Enhancements:

  1. ttkbootstrap Integration:

    • Modern, flat design with "flatly" theme
    • Consistent styling with bootstrap-inspired components
    • Better color schemes and visual hierarchy
  2. 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 (πŸ… πŸ’Ό β˜• πŸŽ‰)
  3. 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
  4. 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

The Pomodoro Technique is a time management method:

  1. Work for 25 minutes (1 Pomodoro)
  2. Take a 5-minute break
  3. After 4 Pomodoros, take a longer 15-20 minute break

This technique helps maintain focus and prevent burnout.

πŸ› οΈ Technologies Used

  • Python 3.x
  • Tkinter: Standard Python GUI framework
  • ttkbootstrap: Modern themed widgets for Tkinter
  • Math module: For time calculations

πŸ“ Credits

  • 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

πŸ“„ License

This project is open source and available under the MIT License.

🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

πŸ“§ Contact

Hossein Mosaffa - LΔ°NKEDΔ°N

Project Link: https://github.com/Hosseinm2018/pomodoro-timer


⭐ If you found this helpful, please give it a star!

About

πŸ… Three Pomodoro Timer versions in Python: Basic (core timer), Enhanced (pause/resume + customization), and Modern (ttkbootstrap UI with sliders, progress bar & notifications). Shows progressive GUI development from simple Tkinter to polished app. Based on Angela Yu's python course, enhanced with advanced features.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages