pomd
is a fully functional pomodoro technique timer for the command line.
It defaults to a 25-5-30 work cycle, though that can be customized through command line arguments.
Here it is in action:
Configuration for pomd
can be changed by editing ~/.config/pomd/config.toml
(managed by Confy). It will be automatically generated with default values when you run pomd
for the first time.
- Custom Work/Short Break/Long Break length support
- Task logging support with the
--log
flag
- Add support for a persistant configuration file
- Add task logging
- Add Taskwarrior integration
- Move to an async runtime
- Make pomodoro complete sound user-configurable
- Change logging format to JSON
In case you're digging through the code, here's how it is laid out.
The program roughly follows MVC. App
is the Model, Tui
is the View, EventHandler
is the Controller.
MVC isn't exactly followed in the sense that the Model does not explicitly tell the View when it is changed. Rather, all events change the Model, so after an Event is handled the View grabs state from the Model and outputs appropriately. I'm honestly not too sure if that's good practice or not in Rust (encapsulation is broken), so if anyone wants to correct me on that feel free.
The program runs in 3 threads:
- The (display, wait for event, handle event) loop
- A KeyListener loop that listens for key press events and notifies the Controller
- A Timer loop that notifies the Controller after every second has passed