Tomat
Tomat ("tomato" in Swedish 🇸🇪) is a Pomodoro timer with daemon support designed for waybar and other status bars.
Features
- 🍅 Pomodoro Technique: Work/break cycles with configurable durations
- ⚙️ TOML Configuration: Persistent defaults via XDG config directory
- ⚡ Daemon Architecture: Robust background service that survives restarts
- 📊 Waybar Integration: JSON output with CSS classes for seamless integration
- 🎮 Visual Indicators: Play ▶ and pause ⏸ symbols for clear state indication
- 🔧 Auto-advance Control: Choose between manual or automatic phase transitions
- 🔄 Process Management: Built-in daemon start/stop/status commands
- 🖥️ Unix Sockets: Fast, secure local communication
- 🌙 Systemd Integration: Auto-start with user session
- 📱 Desktop Notifications: Phase transition alerts with configurable icons
- 🖼️ Icon System: Embedded icon with mako compatibility and custom icon support
- 🔊 Sound Notifications: Audio alerts with embedded sounds and customization
- 💾 Minimal Resources: Lightweight and efficient
Quick Start
# Install from crates.io
# Start daemon and begin working
# Check status (perfect for waybar)
Installation
Prerequisites
On Linux systems, audio notifications require ALSA development libraries:
# Ubuntu/Debian
# Fedora/RHEL
# Arch Linux
Note: Audio will be automatically disabled if ALSA is not available. The timer will still work normally with desktop notifications only.
Install from Crates.io
Quick Setup with Systemd
# Set up systemd service for auto-start
Basic Usage
Start Timer
# Start with defaults (25min work, 5min break)
# Custom durations
# Auto-advance between phases
Control Timer
Daemon Management
Configuration
Create ~/.config/tomat/config.toml to customize defaults:
[]
= 25.0 # Work duration in minutes
= 5.0 # Break duration in minutes
= 15.0 # Long break duration in minutes
= 4 # Sessions until long break
= false # Auto-continue to next phase
[]
= true # Enable sound notifications
= 0.5 # Volume level (0.0-1.0)
[]
= true # Enable desktop notifications
= "auto" # Icon mode: "auto", "theme", or custom path
= 3000 # Notification timeout in milliseconds
💡 Tip: Copy the complete example config:
# Edit as needed
Waybar Integration
Add to your waybar config (~/.config/waybar/config):
Add CSS styling (~/.config/waybar/style.css):
}
}
}
}
}
}
💡 Tip: See examples/ for complete waybar config and styling examples.
JSON Output
Tomat provides waybar-optimized JSON output:
Visual Indicators:
- Icons: 🍅 (work), ☕ (break), 🏖️ (long break)
- State: ▶ (running), ⏸ (paused)
- CSS Classes:
work,work-paused,break,break-paused,long-break,long-break-paused
Documentation
For detailed guides and advanced configuration:
- 📋 Documentation Index - Complete documentation overview
- 📁 Examples - Ready-to-use configurations (waybar, systemd, etc.)
- 📖 Configuration Guide - Complete configuration options
- 🔗 Integration Guide - Waybar, systemd, and notification setup
- 👨💻 Development Guide - Contributing and architecture
- 🐛 Troubleshooting - Common issues and solutions
Examples
Basic Workflow
# One-time setup
# Daily usage
# ... work on your task ...
# ... enjoy your break ...
# Timer automatically suggests when to return to work
Custom Sessions
# Long focus session
# Sprint session
# Deep work (no interruptions)
Integration Examples
# Check if currently working
| | &&
# Get remaining time
|
# Waybar click handlers
Architecture
Client Commands → Unix Socket → Daemon Process → Timer State → JSON Output
↓ ↓ ↓ ↓ ↓
tomat start $XDG_RUNTIME_DIR/ Background Work/Break/ {"text": "🍅 25:00 ▶",
tomat status tomat.sock Service LongBreak "class": "work"}
tomat toggle Phases
- Daemon: Runs continuously, manages timer state and notifications
- Client: Sends commands via Unix socket for fast communication
- Persistence: Timer survives waybar restarts and system suspend/resume
- Notifications: Desktop alerts and optional sound notifications on phase transitions
License
MIT License - see LICENSE for details.
Contributing
Contributions welcome! See the Development Guide for details on:
- Setting up the development environment
- Code quality standards
- Testing infrastructure
- Architecture overview
Happy focusing! 🍅