tris.fyi > blog >

My Pomodoro tool

posted 2021-04-09

Back in February I wrote a Pomodoro tool which runs as a service on your own machine and communicates using MQTT. Here is how to use it:

I use this systemd unit in ~/.config/systemd/user/pomodoro.service (systemctl --user enable --now pomodoro.service):

[Unit]
Description=Pomodoro daemon service

[Service]
ExecStart=/home/tris/.pyenv/shims/python3 %h/bin/pomodoro.py

[Install]
WantedBy=default.target

I use this config in my ~/.i3blocks.conf to display timer status:

[pomodoro]
label=🍅
command=mosquitto_sub -t pomodoro/statusline
interval=persist

I use these shell aliases also:

alias pom='mosquitto_pub -t pomodoro/command -m'
alias pt='pom trigger'

You can subscribe to the topics pomodoro/state and pomodoro/time-remaining from your own tools if you want to do stuff like send a notification whenever you should take a break.