darkrc/bin/pomodoro

26 lines
355 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
2020-05-25 11:19:16 +00:00
echo "🍅 Pomodoro: $1"
}
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
say "Take a break... 💤"
sleep $((60 * 5))
else
say "Take a break... 💤"
sleep $((60 * 15))
fi
done
done