pomodoro-cli 1.0.0

A simple command line Pomodoro timer.
pomodoro-cli-1.0.0 is not a library.

 pomodoro-cli

Pomodoro Timer Command Line Interface

Pomodoro timer is a simple timer that helps you to stay focused on your tasks.

pomodoro-cli is a CLI application which implements the basic functionalities of a basic Pomodoro timer. This application was designed to be used with waybar.

Rust Crates.io License

Installation

Download binary

Cargo

$ cargo install pomodoro-cli

Features

  • Start/Stop the Timer
  • Query the Timer status
  • Add more time to a running timer.
  • Triggers system notification when the Timer is finished
  • Play alarm sound when the Timer is finished
  • Easy Waybar integration
  • Customize notification icon
  • Customize alarm sound

Usage

Options for start:

  • --duration Set the duration for the timer (format: 1h 30m 15s)
  • --notify Triggers system notification when the timer is finished (default: disabled)
  • --silent Do not play alarm sound when the timer is finished (default: enabled)

Start/Stop the timer

# Start the timer with default configuration
$ pomodoro-cli start

# Start the timer with custom configuration
$ pomodoro-cli start --duration "1h 30m 15s" --silent --notify

# Stop the timer
$ pomodoro-cli stop

# Pause the Timer (calling this command again will resume the timer)
$ pomodoro-cli pause

Query the timer status

# Get remaining time in seconds (This is the default behavior for `status`)
$ pomodoro-cli status --format seconds

## Get remaining time in human readable format
$ pomodoro-cli status --format human

Customization

Set custom alarm sound

If you want to use a custom alarm sound, just add a alarm.mp3 file in the ~/.config/pomodoro-cli directory.

$ mkdir -p ~/.config/pomodoro-cli
$ cp /path/to/alarm.mp3 ~/.config/pomodoro-cli/alarm.mp3

Set custom notification icon

Waybar

If you want to use a custom notification icon, just add a icon.png file in the ~/.config/pomodoro-cli directory.

$ mkdir -p ~/.config/pomodoro-cli
$ cp /path/to/icon.png ~/.config/pomodoro-cli/icon.png

Waybar integration

Add the following module to your waybar configuration:

Waybar

"custom/pomodoro": {
    "format": "   {}",
    "tooltip": false,
    "exec": "pomodoro-cli status --format human",
    "on-click": "pomodoro-cli toggle",
    "on-click-middle": "pomodoro-cli reset --duration 5m",
    "on-click-right": "pomodoro-cli add --duration 5m",
    "interval": 1
}

If you want to signal Waybar to update the module immediately when you click it, change use the following configuration:

"custom/pomo": {
    "format": "   {}",
    "tooltip": false,
    "exec": "pomodoro-cli status --format human",
    "signal": 10,
    "on-click": "pomodoro-cli start --duration 5m; pkill -SIGRTMIN+10 waybar",
    "on-click-middle": "pomodoro-cli pause; pkill -SIGRTMIN+10 waybar",
    "on-click-right": "pomodoro-cli stop; pkill -SIGRTMIN+10 waybar",
    "interval": 1
}

Alternatives