Skip to content

Instantly share code, notes, and snippets.

@bashbunni
Last active November 7, 2025 07:08
Show Gist options
  • Select an option

  • Save bashbunni/f6b04fc4703903a71ce9f70c58345106 to your computer and use it in GitHub Desktop.

Select an option

Save bashbunni/f6b04fc4703903a71ce9f70c58345106 to your computer and use it in GitHub Desktop.
CLI Pomodoro for Mac
# I'll be doing another one for Linux, but this one will give you
# a pop up notification and sound alert (using the built-in sounds for macOS)
# Requires https://github.com/caarlos0/timer to be installed
# Mac setup for pomo
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-appIcon '~/Pictures/pumpkin.png'\
-sound Crystal"
alias rest="timer 10m && terminal-notifier -message 'Pomodoro'\
-title 'Break is over! Get back to work 😬'\
-appIcon '~/Pictures/pumpkin.png'\
-sound Crystal"
# Use a pomodoro timer with the fish shell.
# This requires https://github.com/caarlos0/timer to be installed and https://github.com/charmbracelet/gum on PATH
function pom
set split $POMO_SPLIT
if ! test -n "$split"
set split $(gum choose "25/5" "50/10" "all done" --header "Choose a pomodoro split.")
end
switch $split
case '25/5'
set work "25m"
set break "5m"
case '50/10'
set work "50m"
set break "10m"
case 'all done'
return
end
timer $work && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-sound Crystal
gum confirm "Ready for a break?" && \
timer $break && terminal-notifier -message 'Pomodoro'\
-title 'Break is over! Get back to work 😬'\
-sound Crystal \
|| pom
end
@Bahaaio
Copy link

Bahaaio commented Aug 16, 2025

Nice setup! I built a Go CLI tool inspired by this approach - handles notifications and timing with a simple config file:
https://github.com/Bahaaio/pomo

you can do:

  • pomo (work session)
  • pomo 15m (custom duration)
  • pomo break

Is cross-platform (Linux, macOS, Windows).
Includes pause/resume, add/subtract time, and reset functionality.

pomo

example notification config:

notification:
    enabled: true
    title: work finished πŸŽ‰
    message: time to take a break
    icon: ~/my/icon.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment