Nheko-Reborn / nheko

Desktop client for Matrix using Qt and C++20.
https://nheko-reborn.github.io/
GNU General Public License v3.0
1.89k stars 199 forks source link

Notification Sound alerts #1131

Open TheNamelessWonderer opened 2 years ago

TheNamelessWonderer commented 2 years ago

The Problem

Currently Nheko doesn't seem to play any sound when you receive a notification. This means that you can miss important messages.

The Solution

Play a sound with a notification is received.

Alternatives

No response

Additional context

No response

Happens in the latest version

sfPlayer1 commented 2 years ago

I am seeing this as well, not even getting any any notifications or alerts regardless of whether the program is in the background or minimized. I checked all the various ways to configure them, everything application and OS side should work. Sounds work when playing an audio file. Using openSUSE Tumbleweed,

deepbluev7 commented 2 years ago

This happens since your notification daemon does not support the "sound-name" hint from the Freedesktop notification specification: https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html

We could manually play a sound, but really your notification daemon should just implement this.

TheNamelessWonderer commented 2 years ago

Is there a list of notifications daemons that support this?

sfPlayer1 commented 2 years ago

I am just using whatever openSUSE/KDE has by default, nothing niche. There's likely something more fundamental wrong.

deepbluev7 commented 2 years ago

No, KDE simply doesn't support that part of the spec (I talked to one of the devs at some point). I think most notification daemons don't implement that actually.

TheNamelessWonderer commented 2 years ago

It doesn't seem gnome does either. If two of the largest Desktop Environments don't support it then maybe another method should be implemented?

ghost commented 1 year ago

Perhaps there should be a fallback or an option for a different method. I would like to hear notification sounds too but I don't use one of the main desktop environments.

Charadon commented 1 year ago

Yeah, a fallback would be nice. As the notification sound implementation in most DE's are very wonky, and prone to breakage from what i've seen.

JackJeisly commented 1 year ago

I think the implementation of notification sounds should not depend on DE at all... And hearing notification sounds is very useful...

deepbluev7 commented 1 year ago

The benefit of having it be done by the DE, is that you don't get a bug report, when the "do not disturb" mode doesn't work (and configuration and stuff).

JackJeisly commented 1 year ago

I agree, there is such a point. But whether it's possible to implement it so that it works equally well in different DEs, I'm not sure. Gnome, KDE, Mate, IceWM, DWM, etc... they are all different. I only use Linux, and don't use Gnome or KDE, so I have that opinion. And if I need "do not disturb" mode, I just turn off sound or messenger. )

deepbluev7 commented 1 year ago

No, you can mostly do it, it's just work that someone would need to do. Well, unless the notification daemons on those platforms also don't implement the "do not disturb" stuff of the notification dbus spec.

JackJeisly commented 1 year ago

Personally, the lack of a "do not disturb" feature is the least of my worries. What I care about is just having sound notifications, with a personal setting for each room. Working in any DE or any tiled window manager. And that they could'll be disabled globally for all rooms.

JackJeisly commented 1 year ago

Psi messenger has very good internal sound notifications with their own sounds. Perhaps this can help? And he written in C++ and Qt too: https://github.com/psi-im/psi

proatgram commented 1 year ago

On KDE, on notification events that support it you can configure event based notifications, allowing you to specify a notification sound, and even more. Although, on Nheko, this isn't the case. I don't have time to look into it more, but maybe this could help. Screenshot_20230816_073929 Screenshot_20230816_074109

LorenDB commented 1 year ago

I think Plasma 6 is going to implement support for doing hints in regular D-Bus notifications, so maybe at least some people will get to have sound in another 6 months or something.

regalialong commented 3 months ago

Hate to necro this thread but this is a major annoyance to me on Plasma 6 here.

Doubled with notifications being hidden by default when using a fullscreen application, I'm often completely oblivious to someone texting me....

I would either like to see the event based notifications mentioned before so that I can tweak notifications myself or a crowbar solution like nheko playing it itself.

Kimiblock commented 1 month ago

I wrote a small utility snotify previously that monitors dbus and play a sound when a notification is received. It should work with Nheko.