Skip to content

Instantly share code, notes, and snippets.

@romaromaromann
Forked from bashbunni/.zshrc
Last active June 12, 2025 05:57
Show Gist options
  • Save romaromaromann/d5bfe5cf3ddca10a48549d296ce87dc5 to your computer and use it in GitHub Desktop.
Save romaromaromann/d5bfe5cf3ddca10a48549d296ce87dc5 to your computer and use it in GitHub Desktop.
CLI Pomodoro for Linux
# study stream aliases
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro
declare -A pomo_options
pomo_options["work"]="25"
pomo_options["break"]="5"
pomodoro () {
local session=$1
local nosound=$2
if [ -n "$session" ] && [ -n "${pomo_options["$session"]}" ]; then
echo "$session" | lolcat
notify-send "Pomodoro started" "$session session ${pomo_options["$session"]} minutes"
timer "${pomo_options["$session"]}m"
if [ "$nosound" != "n" ]; then
paplay /usr/share/sounds/freedesktop/stereo/complete.oga
fi
notify-send "Pomodoro done" "$session session completed"
fi
}
alias wo='pomodoro work'
alias br='pomodoro break'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment