cd /news/developer-tools/cli-pomodoro-for-linux-zsh · home topics developer-tools article
[ARTICLE · art-8890] src=gist.github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

CLI Pomodoro for Linux (zsh)

This article provides instructions for setting up a Pomodoro timer in the Zsh shell on Linux. It defines a function that uses the `timer` command to count down 45-minute work sessions or 10-minute breaks, and then announces completion using `spd-say`. The setup also includes convenient aliases (`wo` and `br`) to start each session type.

read1 min views21 publishedJan 4, 2023

.zshrc

  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

Show hidden characters

declare -A pomo_options

pomo_options["work"]="45"

pomo_options["break"]="10"

pomodoro () {

  if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then

val=$1

echo $val | lolcat

timer ${pomo_options["$val"]}m spd-say "'$val' session done"

fi

} alias wo="pomodoro 'work'"

alias br="pomodoro 'break'"

── more in #developer-tools 4 stories · sorted by recency
── more on @zsh 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/cli-pomodoro-for-lin…] indexed:0 read:1min 2023-01-04 ·