There are tons of pomodoro timers out there, some simple, some complex, but in my experience they all have the same problem.
The alarm goes off and I think “huh” and keep working.
This is a bash script that uses i3lock-color or swaylock to completely lock your screen when the timer goes off and then keeps you out for the duration of the break, forcing you to step away from your work for a moment.
This is a super simple tool. It just schedules a time for the screen to lock, and then pops the lock screen back up immediately if you try to get in during the break. There is no timer indicating how much time is left. There are no provisions for not locking the screen in certain cases (like if you are watching a fullscreen video).
pomodoro [OPTIONS] <COMMAND> Schedule the screen to lock for B minutes in T minutes from now COMMANDS start halt check install OPTIONS -t|--time MINUTES minutes before break (default 35) -b|--break MINUTES length of break (default 10) -R|--no-repeat do not repeat the timer -n|--notify MINUTES notify MINUTES before screen locks -h|--help show this help
For example, to start a repeating 35 minute timer with a 10 minute break that notifies you 5 and 1 minutes before the screen locks, run:
pomdoro start -t 35 -b 10 -n 1 -n 5
You will need the following dependencies installed
- systemd
- convert, part of the ImageMagick suite
If using i3:
- i3lock-color (minimum version 2.13.c.3, anything older you will need to change the options flags to their pre-standardized versions)
- maim screenshot tool (although this could easily be swapped out)
If using Sway:
- swaylock-effects
- grim screenshot tool
Then clone this repo and run ./pomodoro.sh install
, which symlinks the
necessary files to appropriate locations. (Using symlinks makes it easier to
change behavior without chasing all over the file system.)
pomodoro install
has an optional --with-boot
that adds a systemd user
service to run the timer on startup.
The lock screen displays a message chosen a random from a file
messages.txt
, which is stored in the app’s config directory (by
default, $XDG_CONFIG_HOME/pomodoro
or $HOME/.config/pomodoro
). The
format is ~”${break_minutes} minute break; time to ${message}”~, where
message is a randomly chosen line from messages.txt
.