4
20
Fork
You've already forked pomo
5
Pomodoro CLI
  • Go 91.6%
  • HTML 3.2%
  • CSS 2.7%
  • Makefile 2.1%
  • Shell 0.4%
Find a file
2025年09月14日 13:55:48 +02:00
.github/workflows run tests in ci 2021年07月28日 20:06:45 -04:00
bin improve build support 2018年02月01日 16:11:44 -05:00
cmd/pomo further eliminate references to github.com in package modules 2025年09月14日 11:12:24 +02:00
contrib adds contrib dir for user contributed scripts 2022年05月31日 18:10:10 -07:00
docs update docs 2021年07月28日 20:03:23 -04:00
man add man page 2022年05月30日 15:34:55 -05:00
pkg further eliminate references to github.com in package modules 2025年09月14日 11:12:24 +02:00
www fix broken docs links 2021年07月28日 19:52:48 -04:00
.dockerignore add new build environment for cross compile 2019年03月17日 15:10:28 -04:00
.gitignore fix missing demo on docs site 2021年07月28日 19:58:25 -04:00
.gitmodules add hugo sources 2018年01月22日 22:59:03 +08:00
go.mod further eliminate references to github.com in package modules 2025年09月14日 11:12:24 +02:00
go.sum further eliminate references to github.com in package modules 2025年09月14日 11:12:24 +02:00
LICENSE update license 2019年01月11日 09:26:40 -05:00
Makefile fix broken build flag 2025年09月14日 13:55:48 +02:00
README.md do not link to github.com 2025年09月14日 11:18:48 +02:00
tomato-icon.png refactor run loop, add simple libnotify support, improve notifications, binpack tomato image 2018年01月21日 18:35:03 +08:00

demo

🍅 pomo

pomo is a simple CLI for using the Pomodoro Technique. There are some amazing task management systems but pomo is more of a task execution or timeboxing system. pomo helps you track what you did, how long it took you to do it, and how much effort you expect it to take.

Background

The Pomodoro Technique is simple and effective:

  • Decide on a task you want to accomplish
  • Break the task into timed intervals (pomodoros), [approx. 25 min]
  • After each pomodoro take a short break [approx. 3 - 5 min]
  • Once all pomodoros are completed take a longer break [approx 15 - 20 min]
  • Repeat

Installation

From go proxy

go install codeberg.org/kevinschoon/pomo/cmd/pomo@latest

Source

git clone git@codeberg.org:kevinschoon/pomo.git
cd pomo
make
# copy pomo somewhere on your $PATH
cp bin/pomo ~/bin/

Windows

git clone git@codeberg.org:kevinschoon/pomo.git
cd pomo/cmd/pomo
go build
# pomo.exe won't be available. Add the $GOPATH/bin to your $PATH manually

Package Managers

On Arch Pomo is available on the aur.

On macOS, pomo can be installed via MacPorts.

Usage

Once pomo is installed you need to initialize it's database.

pomo init

Start a 4 pomodoro session at 25 minute intervals:

pomo start -t my-project "write some codes"

Configuration

Pomo has a few configuration options which can be read from a JSON file in Pomo's config directory ~/.config/pomo/config.json.

colors

You can map colors to specific tags in the colors field.

Example:

{
 "colors": {
 "my-project": "hiyellow",
 "another-project": "green"
 }
}

Execute command on state change

Pomo will execute an arbitrary command specified in the array argument onEvent when the state changes. The first element of this array should be the executable to run while the remaining elements are space delimited arguments. The new state will be exported as an environment variable POMO_STATE for this command. Possible state values are RUNNING, PAUSED, BREAKING, or COMPLETE.

For example, to trigger a terminal bell when a session completes, add the following to config.json:

...
"onEvent": ["/bin/sh", "/path/to/script/my_script.sh"],
...

where the contents of my_script.sh are

#!/bin/sh

if [ "$POMO_STATE" == "COMPLETE" ] ; then
 echo -e '\a'
fi

See the contrib directory for user contributed scripts for use with onEvent.

Integrations

By default pomo will setup a Unix socket and serve it's status there.

echo | socat stdio UNIX-CONNECT:$HOME/.pomo/pomo.sock | jq .
{
 "state": 1,
 "remaining": 1492000000000,
 "count": 0,
 "n_pomodoros": 4
}

Alternately by setting the publish flag to true it will publish it's status to an existing socket.

Status Bars

The Pomo CLI can output the current state of a running task session via the pomo status making it easy to script and embed it's output in various Linux status bars.

Polybar

You can create a module with the custom/script type and embed Pomo's status output in your Polybar:

[module/pomo]
type = custom/script
interval = 1
exec = pomo status

luastatus

Configured this bar by setting publish to true.

widget = {
	plugin = "unixsock",
	opts = {
		path = "pomo.sock",
		timeout = 2,
	},
	cb = function(t)
		local full_text
		local foreground = ""
		local background = ""
		if t.what == "line" then
			if string.match(t.line, "R") then
				-- green
				foreground = "#ffffff"
				background = "#307335"
			end
			if string.match(t.line, "B") or string.match(t.line, "P") or string.match(t.line, "C") then
				-- red
				foreground = "#ffffff"
				background = "ff8080"
			end
			return { full_text = t.line, background = background, foreground = foreground }
		elseif t.what == "timeout" then
			return { full_text = "-" }
		elseif t.what == "hello" then
			return { full_text = "-" }
		end
	end,
}

Roadmap

  • Generate charts/burn down
  • ??

Credits