Nheko-Reborn / nheko

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

Support notification settings on Linux #845

Open deepbluev7 opened 2 years ago

deepbluev7 commented 2 years ago

The Problem

There is no way to configure notification sound and similar stuff in the KDE or Gnome settings.

The Solution

Setting X-GNOME-UsesNotifications=true in the desktop files makes Nheko at least show up: https://www.reddit.com/r/gnome/comments/hjdbug/how_does_notification_settings_work/ https://wiki.gnome.org/Initiatives/GnomeGoals/NotificationSource

For KDE advanced settings, the notifyrc seems interesting, but don't ask me where one finds docs for that!

Alternatives

No response

Additional context

No response

Happens in the latest version

deepbluev7 commented 2 years ago

Found the docs: https://api.kde.org/frameworks/knotifications/html/index.html

Akselmo commented 1 year ago

I'd like to help implementing this. However, should we add kNotifications as a dependency?

Alternatively, I was thinking of checking if the system supports notification hints (like sound) at launch of the application. Then, if not, nheko has it's own sound that it plays. Or it uses the default message-new-instant sound, which is usually found here: /usr/share/sounds/freedesktop/stereo/message-new-instant.oga