Bug 460760

Summary: Notification badges for most applications using built-in notifications system
Product: [Plasma] plasmashell Reporter: Yevhen Popok <xalt7x.service>
Component: Task Manager and Icons-Only Task ManagerAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: nate
Priority: NOR    
Version: git-stable-Plasma/5.26   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Yevhen Popok 2022-10-20 12:51:21 UTC
SUMMARY
***
Plasma 5.20 switched to "Icons-Only Task Manager" by default. It brought overall better presentation but also exposed issue with Chat and Email applications.
In a days of a "classic taskbar" (icon + text) programs used to blink or print some text to bring user attention that there's a new chat or e-mail message etc. Since "classic taskbar" is considered obsolete now, both OS/DE and application devs drop such things.
Nowadays users should rely on notifications, tray indicators, shaking effects and "unread badges". Unfortunately Linux Desktop Environments still doesn't have a stable universal API for notification badges. For now there still exist Unity API which KDE Plasma supports. But it's not something application developers would target & distros pre-install. Among messaging apps which supports libunity I know  "Telegram Desktop" and "Ferdium".  Most other apps (e.g. "Viber", "Skype", "Thunderbird", "Google Chat" PWA etc) doesn't. Situation is even worse with new packaging formats (Snap, Flatpak) which could potentially "burn bridges" to Unity API, even for Electron apps.
Recently I've discovered that GNOME extension developers figured out how to get notification counters/badges even without Unity API (references bellow). Basically they get information about unread notifications from the message tray and place number as a badge/indicator on "taskbar icon". When user opens program window, notification is considered as "read" and "badge" disappears. It works fairly well.
Looking at the Notification applet "unread messages", I presume that Plasmashell knows/remembers which programs generated notifications, how many etc. So theoretically this feature could be implemented in KDE Plasma as well.
Again, since we still don't even have a stable API, lots of legacy & proprietary applications, I just don't see a better resolution for this problem (which won't take years to implement and adopt).

Additional option to workaround this issue is a "notification counter" instead/beside a "bell" icon but that's probably should be a separate issue.

---

Aforementioned GNOME extensions:
- RocketBar (https://github.com/linux-is-awesome/gnome_extension_rocketbar)
- Dash to Panel with unofficial modification (https://github.com/home-sweet-gnome/dash-to-panel/issues/1695#issuecomment-1160077515)
- Notification Counter (https://github.com/vkrizan/NotificationCounter)
- new-mail-indicator (https://github.com/fthx/new-mail-indicator)
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Receive a notification about new message at any messaging application that doesn't support UnityAPI ("Thunderbird", "Google Chat", Viber, Skype, Electron chat apps etc) 
2. Check if application icon at "Icons-only Taskbar has an "unread notification" badge

OBSERVED RESULT
Application icon doesn't inform about new messages

EXPECTED RESULT
Application icon has a badge with an unread messages counter

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  KDE Neon User Edition
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Comment 1 Nate Graham 2022-10-20 19:49:53 UTC
I'm frustrated by this situation too, and what you've found for GNOME is a cool hack, but it's very much that: a hack. If we did that, we'd be chasing down weird bugs in apps for years, and taking the responsibility to do so in a way that would stretch our resources. This is why formal APIs exist. So the better solution is for the Unity Launcher API to be standardized and upstreamed, but even than that doesn't *need* to happen for apps to adopt it anyway. As you pointed out, a variety of apps already implement it. The ones that don't could.