diff options
| author | Ibrahim Muftee <ibrahim@muftee.net> | 2025-05-16 22:10:29 -0500 |
|---|---|---|
| committer | Ibrahim Muftee <ibrahim@muftee.net> | 2026-07-01 00:23:31 -0400 |
| commit | 9238b744a673e32ec680adfb888b9bbe99d0af3c (patch) | |
| tree | c006ae5aa589b9cf7e163594f06e27c1a19b8fd0 /dot_zshrc.tmpl | |
| parent | 2a20580b89d6b071119effd6d1d551c4682cc7f7 (diff) | |
feat(zsh): add pomodoro timer
Diffstat (limited to 'dot_zshrc.tmpl')
| -rw-r--r-- | dot_zshrc.tmpl | 17 |
1 files changed, 17 insertions, 0 deletions
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`" |
