A beautiful, feature-rich Pomodoro timer for the terminal with glass-like animations, a statistics dashboard, achievements, a plant collection, goals, theme presets, sounds, notifications, a website blocker, and an AI focus monitor that watches your eyes through the webcam — all 100% local.
"Hyprland-style" UI — fully animated, colorful, and data-driven.
- Pomodoro timer — classic focus / short break / long break cycle, fully configurable (1–180 min per timer, 1–12 sessions before a long break)
- Auto-Run Queue — chain focus + break sessions back to back
- Statistics dashboard — sessions, focus minutes, streaks, and more
- Session history — activity heatmap of your past sessions
- Achievements — unlockable badges celebrated on screen
- Plant collection — grow plants the more you focus
- Goals — set daily / weekly focus targets
- Timer presets — one-tap setups (Standard 25/5, Deep Work 50/10, Sprint 15/3)
- 8 theme presets — with dark / light / auto detection
- Focus animation — pick your favorite timer animation
- Custom sounds — bell, chime, or silent for every event
- Notifications — choose what pops up when a session ends
- Website blocker — block distracting sites during focus time
- AI Focus Monitor — webcam-based eye tracking (MediaPipe) that plays an alarm when you stop focusing. Fully offline — nothing is uploaded. See the dedicated AI Focus Monitor section below.
Requires Python 3.8+ and a terminal that supports ANSI colors.
git clone https://github.com/Thomas73737/python-pomodoro-terminal.git
cd python-pomodoro-terminal
./pomodoroThe rich dependency is installed automatically on first launch if missing.
The AI Focus Monitor lazily installs mediapipe, opencv, and numpy the
first time you enable it.
You can also run it directly:
python3 pomodoro.pyLaunch the app and navigate the menu with the arrow keys and Enter:
| Menu option | Description |
|---|---|
| ▶ Start Pomodoro | Begin a focus + break cycle |
| 🔄 Auto-Run Queue | Chain sessions back to back |
| 📊 Dashboard | Full statistics overview |
| 📈 Session History | Sessions + activity heatmap |
| 🏆 Achievements | Unlockable badges |
| 🌱 Plant Collection | Grow plants with focus time |
| 🎯 Goals | Set daily / weekly targets |
| ⚙ Settings | Timers, sounds, notifications, focus monitor |
| 🎨 Theme | Presets, dark / light / auto |
| ✕ Quit | Exit |
Press q at any time to quit.
The AI Focus Monitor turns your webcam into a focus supervisor for the duration of each work session. It watches your eyes, and if you stop paying attention it plays a loud alarm, sends a desktop notification, and counts the "distraction" so you can review it later.
Face tracking used by the monitor — MediaPipe Face Mesh draws 468 facial landmarks (including eye contours and iris centers) in real time. GIF from the MediaPipe Face Mesh docs (Apache-2.0).
The monitor uses MediaPipe Face Mesh, a lightweight, on-device face tracker, to locate the eyes in every webcam frame. All detection is based on eye geometry — nothing about your face is stored or sent anywhere:
| State | What triggers it |
|---|---|
eyes_closed |
Both eyes are shut — the Eye Aspect Ratio (EAR) drops below a threshold. EAR is the ratio of vertical to horizontal eye distance, a standard way to measure eyelid openness. |
looking_away |
The iris centers drift away from where your eyes rest when you look at the screen. The monitor measures how far the irises sit inside the eye sockets (in eye-width units) and flags a deviation larger than a configurable threshold. |
no_face |
Your face leaves the frame entirely — treated as "stop focusing". |
Because every face and webcam angle is different, the monitor calibrates itself at the start of each session:
- For the first ~3 seconds it collects gaze samples while you look at your work, and stores the median as your "focused" baseline.
- While you're focused, it gently re-adapts that baseline as you move, so head position and posture changes never trigger false alarms.
- A grace period (default ~3s) gives you time to glance away without setting off the alarm — great for reading a line in a book or checking your phone.
The monitor computes the Eye Aspect Ratio from eyelid landmarks
(indices 33,160,158,133,153,144 for the right eye and 362,385,387,263,373,380
for the left):
P1 P2
.______. a = dist(P1, P6) EAR = (a + b) / (2 * c)
| | b = dist(P2, P5) Open eyes → high EAR
P3 | P4 | P5 c = dist(P0, P3) Closed eyes → low EAR
| . |
.______.
P6 P0
For gaze, the iris centers (landmarks 476 and 477) are compared to the
center of each eye socket. The normalized offset — in eye-widths — is
looking_away when it exceeds the deviation threshold (~0.15 eye-widths),
which is a very strict "you left the screen" trigger.
- Everything runs locally on your machine via MediaPipe — no video or images are ever uploaded.
- Dependencies (
mediapipe,opencv,numpy) and the ~10 MB face model (face_landmarker.task) are installed/downloaded automatically the first time you enable the feature in Settings → AI Focus Monitor. - The alarm sound is synthesized on the fly (no audio files shipped).
MediaPipe Face Mesh is Google's open-source face-geometry solution. See the official docs and the face mesh landmark reference (interactive explorer) for details.
All settings and history are saved automatically to ~/.config/pomodoro-hypr/:
config.json— timer lengths, theme, sounds, notifications, blocked sites, focus monitor toggle, and morehistory.json— full session history
| File | Purpose |
|---|---|
pomodoro.py |
Main app, UI, menus, and timer engine |
themes.py |
21-color theme presets + auto detection |
achievements.py |
Unlockable badge registry |
plants.py |
Plant collection & growth system |
stats.py |
Dashboard, history, heatmap, and goals |
sounds.py |
Configurable sound events |
focus_monitor.py |
AI eye-tracking focus monitor (offline) |
focus_test.py |
Standalone test harness for the monitor |
Each module is data-driven — new themes, achievements, plants, goals, or sounds can be added by appending to the matching data structure.
Found a bug or want a new feature? Feel free to open an issue or a pull request.
This project is open source — see the LICENSE file for details (if applicable).
