-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
feat(linux): Emit D-Bus signal directly for dock notification badges #686
base: main
Are you sure you want to change the base?
Conversation
Closes Vencord#298, Vencord#424, Vencord#189 remove (#) title prefix when `Notification Badge` option is toggled explode scuffed option libunity dependency (kabloomed)
Applied reviewer suggestions. Unread Badge displays a `0`
I think it makes most sense to not display an unread pings badge if the count is 0. Idm either way for the • |
@ToxicMushroom The unread count isnt actually "0" in this case. Theres two distinct badge modes; unreads and mentions. Mentions are what have the number count and only shows up for pings and DMs, etc. Unreads are when there is a message in a channel that you do not have muted. Users can disable the unread badge but still have the mention badge. The reason why the unread badge shows a "0" is due to a limitation with the Launcher API it can only show 0-9 with no option for blank badge or a dot. |
Co-authored-by: vee <[email protected]>
Why gdbus? It doesn’t necessarily exist on platforms supporting this DBus API (e.g. KDE Plasma) Can you switch to a DBus node.js library? |
I think we went with cli to not bring in another dep. If the issue is gdbus not existing everywhere we could switch to dbus-send |
There are two DBus implementations: So all in all I’d say if you go with one tool, |
adds `@homebridge/dbus-native` as a dependency
Curious where this PR stands as I'd like to have this fix already so I can ditch the Official Discord Client on GNOME Wayland. |
@CarJem wait for vee to get around to merging or build and run vesktop yourself locally |
Important info: I compiled this pr and used it for some time, this makes programs crash after some time. turns out it opens dbus interfaces like crazy. I'm almost sure it happens even if you shouldn't have a badge. (as in, you don't get any ping or message). |
if the |
@RealSweetPanda I cannot replicate the dbus spam or crashing.
|
Hi, thanks for working on this. Edit: After the vesktop update that came out about an hour ago, unread badge count is now working for me without this PR |
Yeah electron fixed (removed) their desktop env checking for the libunity dep. I still think this PR is relevant tho as libunity is old and many distros don't package it anymore. It should be dropped in favour of dbus communication. There's also some things that this PR does like clean the title of the web specific prefixes |
Hey, I've also built with this since my notification badge doesn't work without this PR. I've also ran into @RealSweetPanda's problem (and I'm on Plasma), in which one of my dbus-broker processes reaches its max file descriptor limit (1024) then it crashes and so does everything on my pc. It seems every single call to I think I managed to fix it on my machine (didn't test for too long, but seems to work and not leave too many connections hanging) by making |
apparently causes crashes but i cant repro :p Vencord#517 should have this same issue so will need this same fix, which is why its in util :3
@Michael-B8 can you lmk if that fixed it. |
Yep, doesn't seem to create any extra connections anymore. Thanks :) If you're curious how I went about checking, I got the pid of the main vesktop process |
Closes #298, #424, #189
remove (#) title prefix when
Notification Badge
option is toggledexplode scuffed optional libunity dependency (kabloomed)