darkrc/bin/pomodoro

26 lines
405 B
Text
Raw Normal View History

2020-05-25 11:19:16 +00:00
#!/bin/sh
say() {
2022-06-02 12:08:29 +00:00
if [ -n "$DISPLAY" ]; then
notify-send "Pomodoro 🍅" "$1"
fi
2022-06-02 12:50:37 +00:00
printf "%s -- 🍅 Pomodoro: %s\n" "$(date +'%H:%M:%S')" "$1"
2020-05-25 11:19:16 +00:00
}
while true
do
for i in 1 2 3 4
do
say "Start working... 🔨"
2022-06-02 11:37:27 +00:00
sleep $((60 * 25))
2020-05-25 11:19:16 +00:00
if [ 4 -eq "$i" ]
then
2022-06-02 12:47:22 +00:00
say "Take a longer break... 💤"
2020-05-25 11:19:16 +00:00
sleep $((60 * 15))
2022-06-02 13:29:54 +00:00
else
say "Take a short break... 💤"
sleep $((60 * 5))
2020-05-25 11:19:16 +00:00
fi
done
done