Pomodoro technique with CLI on macOS
Published on Dec 28, 2023
2 min read
I often turn to the Pomodoro Technique when I'm overwhelmed by my to-do list. This method involves working for a set period (X minutes), followed by a short break (Y minutes), promoting focused sessions.
After trying various apps that lacked the simplicity I desired, I discovered a straightforward command line tool.
Before diving into the specifics, here is what you will need:
- Install timer — a small utility written in Go that has features such as displaying progress using a progress bar, showing remaining time and named timers.
- Make sure that you are using a terminal app (such as iTerm) with alert notifications enabled.
The timer command accepts a duration argument with a unit specifier (
s for seconds,
m for minutes,
h for hours, and so on). For example, to set a timer for 30 seconds:
You can also add a description to your timer using the
timer 30s -n "Some task"
Notification using tput bel🔗
tput is a versatile command that allows shell scripts to perform things such as clear the screen, underline the text, or ring a bell (beep).
You can combine it with
timer to get an alert when your session ends.
timer 30s -n "Short break" && tput bel
If your terminal window is in the background and alerts are enabled, you will receive a notification as shown below:
This setup offers a minimalistic approach to a commonly used technique to manage your focus sessions.
Browse all posts