DEV Community

Cover image for Simplest CLI pomodoro
Petros Amoiridis
Petros Amoiridis

Posted on

Simplest CLI pomodoro

Most pomodoro UI apps these days try to do too much. I am only interested in working for 25 minutes and resting for 5 minutes. And I don't want the interface to stay in the way.

I found Simple CLI Pomodoro timer for macOS | Patrick Loeber and I am capturing the installation and usage here for posterity.

Install

brew install caarlos0/tap/timer
brew install terminal-notifier
Enter fullscreen mode Exit fullscreen mode

Then in your .zshrc add:

work() {
  # usage: work 10m, work 60s etc. Default is 25m
  timer "${1:-25m}" && terminal-notifier -message 'Pomodoro'\
        -title 'Work Timer is up! Take a Break ๐Ÿ˜Š'\
        -sound Crystal
}

rest() {
  # usage: rest 10m, rest 60s etc. Default is 5m
  timer "${1:-5m}" && terminal-notifier -message 'Pomodoro'\
        -title 'Break is over! Get back to work ๐Ÿ˜ฌ'\
        -sound Crystal
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)