TaskBeep - Pomodoro Timer
A Pomodoro timer with productivity tracking that plays a beep sound at the end of each interval.
Features
- Start timer with a custom topic and interval
- Receive beep notification when timer completes
- Signal whether you were working or wasting time
- Track productivity statistics by topic
- Integration-friendly (designed for use with Waybar or other status bars)
- Run custom scripts on timer finish (for notifications, popups, automation)
Usage
Start a Pomodoro Session
# Default 25-minute (1500s) session
# Custom interval (e.g., 45 minutes)
The timer will:
- Run in the background for the specified interval
- Play a beep sound when the interval completes
- Wait for your response about how productive you were
Respond to Timer
When the timer beeps, signal whether you were productive:
# Signal that you were working on the task
# Signal that you were wasting time
Check Status
# Human-readable format (default)
# JSON format (for scripting)
# Plain key=value format (for parsing)
Shows:
- Current status (running/paused/waiting)
- Current topic
- Interval length
- Sessions completed
- Time remaining
- Whether waiting for working/wasting response
The --format flag supports three output formats:
human(default): Human-readable multi-line outputjson: Structured JSON for easy parsing in scriptsplain: Simple key=value pairs, one per line
View Statistics
Shows:
- Total sessions (working vs wasting)
- Overall productivity percentage
- Breakdown by topic with individual productivity rates
Stop Timer
Integration with Waybar
You can integrate this with Waybar to create a visual Pomodoro timer. Here's an example configuration:
Waybar Config (~/.config/waybar/config)
Pomodoro script (~/.config/waybar/scripts/pomodoro.sh)
#!/usr/bin/env bash
cmd=""
if ; then
fi
raw=
if || ; then
fi
status=""
remaining_seconds=0
while ; do
done
Waybar Style (~/.config/waybar/style.css)
}
}
}
}
This configuration:
- Shows remaining time in the status bar
- Left-click to signal "working"
- Middle-click to pause/resume the timer
- Right-click to signal "wasting"
Workflow Example
-
Start your work session:
-
Work on your task for 25 minutes
-
When the beep sounds, assess your productivity
-
Signal your response (click in Waybar or run command):
-
Take a break or start another session
-
Review your statistics:
Configuration
TaskBeep can be configured via a TOML configuration file located at ~/.config/taskbeep/config.toml
Configuration Options
session_duration: Default session duration in seconds (default: 1500 / 25 minutes)volume: Audio volume from 0.0 to 1.0 (default: 0.4)beep_frequency: Beep sound frequency in Hz (default: 2048.0)first_beep_duration: First beep duration in seconds (default: 0.08)second_beep_duration: Second beep duration in seconds (default: 0.12)gap_duration: Gap between beeps in seconds (default: 0.09)pause_duration: Pause after beep pattern in seconds (default: 0.7)on_timer_finish: Optional script to run when the timer finishes
Script Execution on Timer Finish
You can configure a script to run automatically when the timer finishes (after the beep). This is useful for:
- Showing custom notifications
- Displaying interactive prompts (e.g., with rofi, fuzzel, dmenu)
- Logging session information
- Automating the working/wasting response
Add this to your config.toml:
= "/path/to/your/script.sh"
The script receives these environment variables:
TASKBEEP_TOPIC: The current task topicTASKBEEP_DURATION: Session duration in secondsTASKBEEP_SESSION_COUNT: Number of completed sessions (including the current one)
Security
Scripts run with your user privileges. TaskBeep validates:
- The script path must be absolute (e.g.,
/home/user/.config/taskbeep/script.sh) - The script must exist and be executable (
chmod +x script.sh)
Only configure scripts you trust.
Example Scripts
The repository includes ready-to-use example scripts in the examples/on_beep/ directory:
Interactive Prompts:
rofi_prompt.shfuzzel_prompt.shwofi_prompt.shzenity_prompt.sh
Other Examples:
notify_only.shlog_session.shmotivational_messages.sh
See the examples/on_beep directory for more details and usage instructions.
The examples/waybar/ directory is available for Waybar integration examples.
Quick setup:
# Copy the script you want
# Configure in ~/.config/taskbeep/config.toml
Managing Configuration
# Show configuration file path
# Reset configuration to defaults
# View current configuration
Installation
Building
The binary will be at target/release/taskbeep
Requirements
- Linux system with audio output
- Rust 2024 edition or later