There is no notification sound at all on the linux kde desktop when you receive messages. I have tried all sorts to create one. I failed, can someone please help.
I tried to grab the pop-up notification so i could write some code to fire a sound.
The pop-up notification windows just does not have anything that i can “grab” onto, no name, no class, no id, no nothing. I can not poll the screen continually to look for the pop-up and make a sound if it shows because i just can’t test for it.
So i tried to figure where in the source the notification is fired. If i was forced to guess i would say it is in
/src/gui/systray.cpp line 517 QSystemTrayIcon::showMessage(title, message, icon);
I do not know how to test it without building it and i failed at trying to build it, it says /home/greg/Downloads/desktop-master/src/gui/systray.cpp:518: undefined reference to QSound::QSound(QString const&, QObject*)'`
I have added the #include <QtMultimedia/QSound> but still fails
I honestly dont know. I think that half the time they just assume that if they trigger a native notification for whatever OS / DE that it should handle the sound natively. Well KDE does but not in the way that they think.
Looking a bit longer at your post i believe that that is just going to affect the server not the client apps. I think the “Desktop” app in my case would have to be altered for it to have sound.
Yeah, this just doesn’t make sense. I mentioned this in the linked Github PR, but this was merged as though the feature was implemented. It is not. If someone calls me using Spreed, I get a ringtone. This is how I know Nexcloud/Spreed can play a sound without me initiation an action in my browser. I’m on Chromium and the incoming call sound works just fine with no initiated action from me.
Yet, chat notifications do not play a sound at all.
I ended up writing a script that continually watches for the notification GUI (any notification GUI, because there is no way to tell if its the one I’m looking for) and then using “tesseract” OCR on it to look for specific words like “Nextcloud” and “message”.
It’s far from perfect, but i don’t see any alternative.