Skip to content

alexey-bachmanov/tiny-timer

Repository files navigation

Pomodoro Timer Widget

A minimal, always-on-top Pomodoro timer overlay widget built with Tauri v2 and vanilla JavaScript. Designed to be unobtrusive and sit in the corner of your screen while you work. I went on an extensive search for something like this, only to realize it didn't exist. So I rage-coded it.

Features

  • 🎯 Always-on-top overlay - Stays visible above all other windows
  • ⏱️ Classic Pomodoro technique - Focus sessions with short and long breaks
  • 🎨 Three size modes - Small (240px), Medium (320px), Large (400px)
  • 🔔 Audio notifications - Sound alert when timer phases complete
  • 🎚️ Adjustable volume - Control notification volume (0-10)
  • 📊 Visual progress ring - Animated border shows remaining time
  • 🖱️ Frameless, draggable window - Clean design, drag from titlebar
  • ⚙️ Customizable durations - Adjust focus and break times to your preference
  • 💾 Persistent settings - Your preferences are saved between sessions

How It Works

The app follows the Pomodoro Technique:

  1. Focus phase (default: 25 min) - Work on a single task
  2. Short break (default: 5 min) - Quick rest after each focus session
  3. Long break (default: 15 min) - Extended break after 4 focus sessions

The animated progress ring around the window shows time remaining. When a phase completes, you'll hear a notification sound and the timer automatically transitions to the next phase.

Controls

  • Start/Pause button (center) - Begin or pause the current timer
  • Reset button (↺) - Restart the current phase
  • Skip button (⇥) - Jump to the next phase
  • Settings button - Configure durations, volume, and window size
  • Close button (×) - Exit the application

Installation & Setup

Prerequisites

Install Dependencies

npm install

Development

Run the app in development mode with hot-reload:

npm run tauri:dev

Production Build

Build a standalone executable:

npm run tauri:build

The compiled application will be located in src-tauri/target/release/.

Windows: src-tauri/target/release/pomodoro-timer-widget.exe

Customization

Change Timer Durations

Click the "Settings" button in the app to adjust:

  • Focus duration (1-60 minutes)
  • Short break duration (1-30 minutes)
  • Long break duration (1-60 minutes)
  • Long break interval (every 2-10 focus sessions)
  • Volume (0-10)
  • Window size (Small/Medium/Large)

All settings are automatically saved when you make changes and will persist across app restarts. Settings are stored locally using the WebView's localStorage API.

Custom Notification Sound

  1. Replace or add your sound file at: src/assets/sounds/notification.wav
  2. Rebuild the application
  3. The sound will play when each timer phase completes

Custom App Icon

  1. Replace src-tauri/icons/icon.png with your icon (recommended: 1024x1024px or larger)
  2. Generate all platform-specific formats:
    npm run tauri icon
  3. Rebuild the application

Note: Windows aggressively caches app icons. After rebuilding, you may need to clear the icon cache or restart to see the new icon.

Technology Stack

  • Frontend: Vanilla JavaScript, HTML5, CSS3
  • Framework: Tauri v2 - Rust-based native app framework
  • Build Tool: Vite 6.4
  • Architecture: Pure state machine for timer logic (see timer.js)

Project Structure

pomodoro-timer-widget/
├── src/
│   ├── assets/
│   │   └── sounds/
│   │       └── notification.wav    # Audio alert (user-provided)
│   ├── index.html                  # Main HTML structure
│   ├── main.js                     # UI orchestration and event handling
│   ├── styles.css                  # Styling with CSS variables for scaling
│   └── timer.js                    # Pure timer state machine logic
├── src-tauri/
│   ├── icons/                      # Application icons (all formats)
│   ├── src/
│   │   └── main.rs                 # Rust entry point
│   ├── Cargo.toml                  # Rust dependencies
│   └── tauri.conf.json             # Tauri configuration
├── vite.config.js                  # Vite bundler config
└── package.json                    # Node.js dependencies and scripts

Platform Support

  • Windows 10/11 - Fully tested
  • ⚠️ Linux - Should work, not yet tested
  • macOS - Not yet tested

License

MIT

About

I couldn't find a simple pomodoro timer widget, so I went and made one. This project was also constructed as a deliberate experiment with LLM-assisted coding, to explore their strengths and weaknesses.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors