jonathan warykowskijwarykowski

herdr-pomodoro

A herdr plugin: a pomodoro timer with notifications, a sidebar token and hooks.

herdr-pomodoro is a pomodoro timer for herdr: 25 minutes of work, a 5 minute break, and a 15 minute break every fourth round, all configurable. herdr notifies you when each phase ends, and $pomo shows the time left in the sidebar (๐Ÿ…12m).

Its state is one JSON file, so anything can show it: a Neovim statusline, a shell prompt, or your keyboard with herdr-zsa-lights.

Install

You need herdr 0.9.3 or later and jq.

herdr plugin install jwarykowski/herdr-pomodoro

Bind the toggle, and add $pomo to the sidebar, in herdr’s config.toml:

[[keys.command]]
key = "prefix+p"
type = "plugin_action"
command = "jwarykowski.herdr-pomodoro.toggle"
description = "start / stop the pomodoro"

[ui.sidebar.spaces]
rows = [["state_icon", "workspace", "$pomo"], ["branch", "git_status"]]

Actions

ActionWhat it does
toggleStop if running, else start
startStart a work round
stopStop and reset the round count
skipEnd the current phase now

Each is jwarykowski.herdr-pomodoro.<action>. After a break the timer waits for you; set HERDR_POMODORO_AUTO_CONTINUE=1 to carry straight on.

In Neovim

The repo is a Neovim plugin too, with a statusline component:

{ "jwarykowski/herdr-pomodoro", lazy = true }
lualine_x = { function() return require("herdr-pomodoro").status() end },

It shows ๐Ÿ… 12:34, โ˜• 3:10 or โธ, and reads the state file at most once a second. For a shell prompt, bin/pomodoro status prints the same.

Hooks

An executable named after an event, in $(herdr plugin config-dir jwarykowski.herdr-pomodoro)/hooks/, runs when it happens: pomodoro.started, pomodoro.work_done, pomodoro.break_done and pomodoro.stopped. The README lists what each one gets.