The telegram desktop app can update its launcher count in KDE (see image below). It also works in Cinnamon.

(Image: Telegram’s launcher count in KDE).
How does it work, and how can I integrate such a mechanism in apps I develop?
Can someone provide a minimal example of such a badge counter (for KDE) that can be updated programmatically ?
In Unity, there was a prescribed way to update the launcher count, that is seemingly not present in other desktop environments, but telegram seems to be able to do that.
This reddit post says that this feature from unity has not been implemented in KDE. However, telegram seems to have implemented this feature.
@luisbocanegra Thank you for sharing the link. I implemented the following (Merge pull request #22 from archisman-panigrahi/launcher-count-kde · archisman-panigrahi/typhoon@bc60f18 · GitHub) after reading this qt - KDE Taskbar Progress - Stack Overflow (from the link you shared).
It works on KDE6’s default taskbar! But it does not work on Latte Dock or in Planck.
However, telegram’s implementation works on Latte dock in KDE5, and also in Planck dock.
Any idea what magic telegram is doing?
I figured out a universal method (by calling dbus, instead of pyqt5), that works in KDE panel, Latte Dock, Dash-to-Dock in GNOME, as well as Plank dock in any desktop environment.
1 Like