DEV Community

Cover image for Pomodoro Timer for Terminal
Leo Pfeiffer
Leo Pfeiffer

Posted on

6 4

Pomodoro Timer for Terminal

The Pomodoro Technique is one of the most popular productivity / time management techniques around.

As programmers, we spend a lot of time in the terminal - and so I decided to build a super simple Pomodoro timer for the terminal.

⬇️ Get it here.

Screenshot of a terminal running the pomodoro command.

The timer is implemented as a simple shell script, so you can simply source it to use the pomodoro command.



source pomodoro.sh


Enter fullscreen mode Exit fullscreen mode

To start the timer, run:



pomodoro


Enter fullscreen mode Exit fullscreen mode

A pomodoro consists of four work intervals with intermediate breaks:

Work (25 min) - Short Break (5 min)
Work (25 min) - Short Break (5 min)
Work (25 min) - Short Break (5 min)
Work (25 min) - Long Break (25 min)

You can customize the lengths of the work and break intervals.

For example, a work interval of 10 min (600s) with a 1 min (60s) short break and 2 min (120s) long break could be set like this:



pomodoro -w 600 -s 60 -l 120


Enter fullscreen mode Exit fullscreen mode

Beyond the countdown visible in the terminal, you will also get a notification whenever you start a work or break interval. (Notifications are only supported on Mac OS - sorry).

Screenshot of two notifications on a MacBook screen showing the pomodoro timer intervals

You can turn off the notifications if you want:



pomodoro --quiet


Enter fullscreen mode Exit fullscreen mode

Happy working!

⬇️ You can get the script here.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (1)

Collapse
 
andrewbaisden profile image
Andrew Baisden

Cool what a useful tool.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs