-
-
Save romaromaromann/d5bfe5cf3ddca10a48549d296ce87dc5 to your computer and use it in GitHub Desktop.
CLI Pomodoro for Linux
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
# 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