Add config option for playing sound-hints with desktop notifications - #481
Conversation
This patch adds a configuration element called "play_sound (bool, false by default)" that when set true, it will tell the notification to use sound hint called "message-new-instant" which then plays a sound, depending on the platform the app is running in.
|
I haven't added docs yet, just testing the waters first. |
|
I think it would make more sense to make the config option a string with the sound name. Some people might want a different sound to play and I'm not certain the default sounds on windows and macos use the same name as linux anyways. We could then list the default sound names for each OS in the documentation. |
Yeah i can do that instead. |
Can play sound from any of these items https://0pointer.de/public/sound-naming-spec.html
|
Turned it into a |
VAWVAW
left a comment
There was a problem hiding this comment.
Looks good. Just some small suggestions according coding style.
|
Will write documentation about it next. |
|
This looks good! Thank you @Akselmo for adding this! I'll make sure it gets added to the website when I cut the release. |
|
@ulyssa will you also add it to the man page or should that be a new PR? |
|
I'm jotting this down here before I forget as some basic outline for the manual entry:
|
|
For windows the options are |
|
For macos, it seems like the system sounds are located in |
This patch adds a configuration element called
play_sound(bool, false by default) that when set true,it will tell the notification to use sound hint called
message-new-instantwhich then plays a sound,depending on the platform the app is running in.
(I haven't really used Rust before so bear with me 😅 )