Pomodoros
This commit is contained in:
parent
0e69a41e49
commit
670d17c6aa
|
@ -16,11 +16,19 @@ fi
|
|||
current_seconds=$(date +%-S)
|
||||
current_minute=$(date +%-M)
|
||||
|
||||
if (($current_minute < 30)); then
|
||||
echo "Next ring at half hour."
|
||||
if (($current_minute < 25)); then
|
||||
mpv $HOME/media/audio/bell.opus
|
||||
echo "Next ring at 25."
|
||||
sleep_seconds=$(( (24 - $current_minute)*60+ (60 - $current_seconds)))
|
||||
elif (($current_minute < 30)); then
|
||||
echo "Next ring at 30."
|
||||
sleep_seconds=$(( (29 - $current_minute)*60+ (60 - $current_seconds)))
|
||||
elif (($current_minute < 55)); then
|
||||
mpv $HOME/media/audio/bell.opus
|
||||
echo "Next ring at 55."
|
||||
sleep_seconds=$(( (54 - $current_minute)*60+ (60 - $current_seconds)))
|
||||
else
|
||||
echo "Next ring at full hour."
|
||||
echo "Next ring at 0."
|
||||
sleep_seconds=$(( (59 - $current_minute)*60+ (60 - $current_seconds)))
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue