Oughie / clock-rs

clock-rs - A clock for your terminal!
Apache License 2.0
27 stars 2 forks source link

Alarm sound for timer #5

Open philer opened 1 week ago

philer commented 1 week ago

Hey, great project! I particularly appreciate the addition of a timer function – however since there is no alarm sound when the timer reaches zero it is of limited use. When I set myself a timer for a cup of tea I don't want to have to check it continuously.

For now I'm helping myself with this workaround:

$ (sleep 5; paplay /usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga) & clock-rs timer 5

That works in bash like shells. However it's not particularly convenient and does not allow me to reset the timer.

A sort of in between solution would be an option to exit when the time reaches zero, so you can do

clock-rs timer 5; paplay …

That could be useful in combination with other commands as well, basically using clock-rs timer as a fancy sleep replacement.

(On a side note, it would be nice to have a +1 min keybind)

Oughie commented 5 days ago

Thank you for opening an issue 😄

Great idea! I will look forward to implement this as soon as I find some more time, perhaps even this weekend.

Oughie commented 3 days ago

I've published v0.1.209, which adds the ability to exit the application once the timer finishes. Update clock-rs and run $ clock-rs timer 5 -k; echo "Timer reached zero" to see if your issue is resolved. If so, you can close this issue.

Also, I will add a +1min (or +30s) key bind in a bit.