{"slug": "cli-pomodoro-for-linux-zsh", "title": "CLI Pomodoro for Linux (zsh)", "summary": "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.", "body_md": ".zshrc\n\n      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.\n      \nLearn more about bidirectional Unicode characters\n\n \n    Show hidden characters\n\n# study stream aliases\n\n# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro\n\ndeclare -A pomo_options\n\npomo_options[\"work\"]=\"45\"\n\npomo_options[\"break\"]=\"10\"\n\npomodoro () {\n\n  if [ -n \"$1\" -a -n \"${pomo_options[\"$1\"]}\" ]; then\n\n  val=$1\n\n  echo $val | lolcat\n\n  timer ${pomo_options[\"$val\"]}m\n\n  spd-say \"'$val' session done\"\n\n  fi\n\n}\n\nalias wo=\"pomodoro 'work'\"\n\nalias br=\"pomodoro 'break'\"", "url": "https://wpnews.pro/news/cli-pomodoro-for-linux-zsh", "canonical_source": "https://gist.github.com/bashbunni/3880e4194e3f800c4c494de286ebc1d7", "published_at": "2023-01-04 16:28:14+00:00", "updated_at": "2026-05-22 13:10:15.270300+00:00", "lang": "en", "topics": ["developer-tools", "open-source"], "entities": ["zsh", "lolcat", "timer", "spd-say"], "alternates": {"html": "https://wpnews.pro/news/cli-pomodoro-for-linux-zsh", "markdown": "https://wpnews.pro/news/cli-pomodoro-for-linux-zsh.md", "text": "https://wpnews.pro/news/cli-pomodoro-for-linux-zsh.txt", "jsonld": "https://wpnews.pro/news/cli-pomodoro-for-linux-zsh.jsonld"}}