cyberos / cyber-dock

Application Dock
GNU General Public License v3.0
1 stars 0 forks source link

[Feature request] Badges #7

Open probonopd opened 3 years ago

probonopd commented 3 years ago

image

More information: https://github.com/signalapp/Signal-Desktop/issues/3387

reionwong commented 3 years ago

Maybe it needs StatusNotifier protocol

reionwong commented 3 years ago

Code for reference:

https://github.com/electron/electron/blob/b6246dcf122e584c672566877cb60d33dbc4705e/shell/browser/linux/unity_service.cc#L129

itsvic-dev commented 3 years ago

So I'm looking into this and it seems like the badges API was introduced and popularized by Unity, and still is used today, most commonly with libunity.

I found this, maybe we could reference it? It is JavaScript though, which made it slightly hard to follow when I was looking into it myself. https://github.com/micheleg/dash-to-dock/pull/590

Ubuntu's documentation is here. https://wiki.ubuntu.com/Unity/LauncherAPI#Low_level_DBus_API:_com.canonical.Unity.LauncherEntry

Would it be possible to implement this in the Dock (or in libcyber-system) with Qt DBus? I'm not that familiar with Qt, Qt DBus, or even DBus, so I don't really know where to go from here. The API is using the object path of DBus to emit a signal on the service com.canonical.Unity.LauncherEntry. As far as my knowledge goes, I don't think we can implement this with Qt DBus, we might need a lower-level implementation instead.

Thoughts? @rekols @probonopd

probonopd commented 3 years ago

Hi @omaemae

Thanks for the pointers to com.canonical.Unity.LauncherEntry.

I think the Dock could implement the needed D-Bus calls using Qt. I would appreciate if the Dock would not have any dependencies on things like libcyber-system but only dependencies on very basic libraries that are part of all Linux and BSD distributions such as Qt, D-Bus, Xorg etc. (The Dock was chosen for helloSystem in part becase of this.) So I think the required com.canonical.Unity.LauncherEntry D-Bus pieces should be done inside the Dock using Qt D-Bus.