Created
January 21, 2026 06:35
-
-
Save bashbunni/e311f07e100d51a883ab0414b46755fa to your computer and use it in GitHub Desktop.
Pomodoro CLI for Fish Shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
I used termdown on Arch Linux as an alternative when one wants an entire secondary panel –maybe in TMUX– to show the timer bigger on a side instead of just the advancement bar.
I also made it so that I can run it by default with timer, but then have the --termdown or -t flag to instead use termdown.
function pom
# Parse arguments for timer choice
set -l use_termdown false
for arg in $argv
switch $arg
case --termdown -t
set use_termdown true
end
end
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
# Choose timer based on flag
if test $use_termdown = true
set timer_cmd termdown
else
set timer_cmd timer
end
$timer_cmd $work && notify-send -u critical "Pomodoro" "Work Timer is up! Take a Break 😊"
gum confirm "Ready for a break?" && $timer_cmd $break && notify-send -u critical "Pomodoro" "Break is over! Get back to work 😬" || echo "Pomodoro session ended"
end
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this version for fish users! 😊