From 9238b744a673e32ec680adfb888b9bbe99d0af3c Mon Sep 17 00:00:00 2001 From: Ibrahim Muftee Date: Fri, 16 May 2025 22:10:29 -0500 Subject: feat(zsh): add pomodoro timer --- dot_zshrc.tmpl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'dot_zshrc.tmpl') diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 47802db..2e05682 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -128,6 +128,23 @@ alias ll='exa -l --color=always --group-directories-first' # long format alias lt='exa -aT --color=always --group-directories-first' # tree listing alias l.='exa -a | egrep "^\."' +# Pomodoro timers (credit to https://gist.github.com/bashbunni/3880e4194e3f800c4c494de286ebc1d7) +declare -A pomo_options +pomo_options["work"]="20" +pomo_options["break"]="5" + +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'" + # Kill Kodi with one command alias killkodi="kill -9 `ps aux | grep '/usr/lib/x86_64-linux-gnu/kodi/kodi.bin' -m 1 | tr -s ' ' | cut -d ' ' -f 2`" -- cgit v1.2.3