-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support the "sound-file" and "sound-name" hints #424
Comments
Just like #36 explains, mako won't support playing sounds out-of-the-box. It already supports playing a fixed sound:
It could easily support extracting the sound hint via |
I didn't know scripts could extract the notification hints, I'll give that a shot. But it does feel a bit strange that every user has to reinvent the wheel to get their chat application notifications to play sounds that work by default in other desktop environments. Having sounds with your notifications feels like a given in 2022. Would it be at least be reasonable to provide an official example script that makes the "sound-file" and "sound-name" hints work on most systems? |
If you want a fancy notification daemon, don't use mako. mako is designed to be lightweight and bare-bones. |
Of course, I guess we just disagree on the definition of "fancy". Getting an audible notification when receiving an email or instant message has been the norm for as long as I can remember. Sounds is as integral to notifications as audio is video. I wouldn't say a silent movie is bare bones, I would say it's missing something crucial. I definitely wouldn't call a movie with audio "fancy" 🙂 But you are the boss. Unfortunately I'm not actually aware of any other stand-alone notification servers that runs on Wayland, but I will an eye out. |
Should all notification hints be included in
|
The FreeDesktop notification spec defines some optional hints that notification servers can support, two of which are "sound-file" and "sound-name", both of which are intended to play a notification sound.
After a bit of testing, it seems like mako doesn't support these hints. I tried
notify-send "Sound test!" -h STRING:sound-file:/sound/file/path
with an MP3 file and a WAV file, and neither played a sound.I also tested playing sound names with sounds that are installed on my PC:
notify-send "Sound test" -h STRING:sound-name:bell
, also without success.Ideally, all applications that display notifications should use the Desktop Notifications Specification, and ideally they should not play any sound of their own, but instead provide a sound file path or sound name to the notification server. This enables features such as "busy mode" on the notification server to pause notifications, or overriding notification sounds. If the application plays its own audio then a "busy mode" feature would be almost pointless.
But currently, if an application relies on the notification server to play sounds, the notification sound would not play when using Mako. (Unless I misunderstood something.)
Bonus, if Mako added support for "sound-file" and "sound-name", then it would probably be trivial to add a configuration option to set a default value for these hints, in case applications don't provide one. That would solve #36 in a very nice way.
The text was updated successfully, but these errors were encountered: