tobi-wan-kenobi / bumblebee-status

bumblebee-status is a modular, theme-able status line generator for the i3 window manager.
https://bumblebee-status.readthedocs.io/en/main/
MIT License
1.2k stars 229 forks source link

Pomodoro Audio Notifications #999

Open PrabhuUdurg opened 9 months ago

PrabhuUdurg commented 9 months ago

Hi! Most Pomodoro timers have a sound notification, which is really helpful. I added this feature also to the Pomodoro module. I used simpleaudio library to play sounds. Also, I added two variables at the beginning of the file, for the work and rest duration, to make the user change it easier, and for better maintainability. Additionally, I added a sentence about how to change these parameters in the header. Thank you

tobi-wan-kenobi commented 9 months ago

Thanks a lot for the PR!

I have a couple of small suggestions/requests:

  1. Please keep the 2 parameter hardcoded, those are just the default values and can be changed using "-p pomodoro.". Users should not have to modify the source code (because updates will override their changes)

  2. Instead of committing the wav, please let users specify (via parameter) the audio file they want to play. I don't know where that wav came from and want to avoid copyright/usage dispute problems. Any content not directly generated by bumblebee has to come from the user.

Hope that helps! Thank you!

PrabhuUdurg commented 9 months ago

Hallo! I can remove the path and file, but then the library throws an error. How I should handle this, thank you

tobi-wan-kenobi commented 9 months ago

If the wav does not exist, I would suggest to just log an error (using log.error) and continue.

PrabhuUdurg commented 9 months ago

Hallo! I made changes, now user can upload their own audio files, The error problem was handled by try except.

tobi-wan-kenobi commented 9 months ago

Thanks a lot for the prompt responses @PrabhuUdurg !

I added a couple more notes that, in my opinion, improve the functionality a bit & might hopefully help you better understand the design ideas behind the bumblebee modules (often not very apparent, I admin).