There is something very exciting I have to show to you today: a completely rewritten notification system for Plasma that will be part of our next feature update 5.16 to be released in June.
I have been planning to do this rewrite for years. In fact, the wiki page where I collected ideas and mock-ups was created in July 2016 and “assumes the status quo as of Plasma 5.7”. The old notification plasmoid was originally written in 2011, when QML was still pretty new. It later got ported to Plasma 5 and slightly overhauled, most noticeably using individual popups rather than the scrolling ticker of notifications we had in the late Plasma 4 days. However, its core logic hardly changed and it became evident that its code base could not support many of the feature users expect from a notification center these days. I had started a rewrite branch last summer but only recently found the time and motivation to finish it and basically hacked on that thing for a month straight, and here’s what came out of that:
New look and feel
The first thing you’ll notice is that the notifications are much more compact with the icon on the opposite side now and the issuing application prominently displayed. Font sizes have also been streamlined and the heading is now allowed to wrap. A major behavior change in the new system is that persistent notifications stay on screen until dismissed. This ensures that important notifications and ones that require user interaction, such as a pairing request from a Bluetooth or KDE Connect device don’t go unnoticed.
When an application sets a “default” action, the cursor changes to a pointing hand to indicate that the popup itself is clickable. A little bar on the side indicates when the notification will time out. I worked together with Nicolas Fella of KDE Connect fame to improve the user experience when syncing your devices and it will soon be possible for it to annotate a notification with the name of the device it originally came from and the actual app on the device that sent it.
My all time favorite productivity feature in Plasma, notification thumbnails, has of course been touched up. It now uses a better aspect ratio and has a lovely blur effect to go with it. In case you didn’t know: when you take a screenshot in an application like Spectacle (remember Meta+Shift+Print Screen) or Flameshot you can drag the screenshot preview in the notification anywhere you like, for example your web browser, or an email composer.
Do not disturb mode
Another new major feature is “Do not disturb” mode. When enabled, no notification popups are shown and the Notification Sounds stream is muted. All notifications go straight to the history for later reference.
However, there are some notifications that should get through nonetheless. This is why the new server also supports the “Urgency” hint which an application can use to specify whether a notification has low, normal (the default), or critical urgency. Critical notifications, such as your battery is about to die, are shown even in do not disturb mode. KDE applications can now add a Urgency= key to an event in their .notifyrc file or use the setUrgency method on KNotification added in the upcoming Frameworks release. Moreover, you can specify which applications are allowed to send notifications regardless.
There is currently a discussion on the XDG mailing list about a DBus protocol for notification inhibitions so applications like LibreOffice Impress, Okular, OBS, and others could automatically enable this mode when giving a presentation or hosting a livestream. Speaking of presentations, while regular notifications aren’t shown on top of full-screen windows for added privacy, critical notifications will be, so you won’t miss your laptop running out of juice mid-lecture.
Progress reporting
Progress reporting when copying or receiving files has also been revamped and uses the same style as notifications. A more useful summary text is displayed, showing the most important information at a glance: the name of the file or number of files being processed as well as the destination and time remaining. This way you never actually have to expand the details section to see what’s going on. You still can, of course.
When a job finishes it turns into a regular notification and just times out. In case of error it stays visible so you can investigate what went wrong. One major complaint we got with the old progress reporting was that it’s easy to miss since it’s just a little circle in the panel. To address this, by default the job popup opens and stays there until the task has finished. It can be manually hidden at the click of a button and there’s an option to automatically do that a few seconds into the progress, if you prefer that.
Notification history
An always only half-hearted feature was the notification history. Currently it collects every notification and gets cluttered quickly. In the new history, we try to reduce the amount of spam that piles up: notifications that you explicitly closed, interacted with, or that got revoked by the issuing application aren’t added to the history. Unfortunately, with the freedesktop Notification protocol and how KNotification is built around that a proper history isn’t possible: an application cannot revoke a notification once it expired even if it afterwards knows it became obsolete.
To remedy the effects of piling up old notifications they are grouped by application and only the last couple of notifications are shown, with the possibility to expand a group to show all of them. Additionally, low urgency notifications, which could be your media player changing tracks, aren’t added to the history by default.
New settings module
What would be a new feature in KDE land without settings? ;) Accompanying the new notification server and plasmoid is an all-new System Settings module.
It lets you configure various aspects of notifications and job reporting in a central place. Settings for badges (the little number circle on app icons) and application progress in task manager have also been moved to this central location. Furthermore, the default popup time out, i.e. when an application doesn’t explicitly specify one, is now a fixed number of seconds. The old implementation tried to find a sensible timeout based on the number of words and an “average read speed” but its inaccurate algorithm often lead to popups staying on screen a long time for no apparent reason.
While it has always been possible to configure notifications of KDE’s own applications to a great degree, there was no way to influence the behavior of 3rd party apps. The new settings module is able to find Gnome applications that set the appropriate hint as well as remember any application that sent a notification in the past.
This allows you to disable popups for those applications, too, as well as keep them out of your notification history or white-list them for do not disturb mode. The fine-grained notification event configuration for KDE applications is also still available.
Give it a try!
There’s a couple of days left until Plasma 5.16 Beta, to be released on 16 May, so there’s still some time for you to try it out beforehand and give feedback. With the new implementation I managed to fix almost 20 distinct bug reports. Go spin up your developer machine and build plasma-workspace master branch from git. You may also update your favorite distribution sporting daily builds, however, the feature has only been merged recently, so it might take some time for updated packages to be generated.
If you find a notification that looks odd or different from how it used to, do tell me! Ideally, you’ll be monitoring DBus traffic to find out what exact notification and data the application sent and help me reproduce and fix the issue. Just run
dbus-monitor interface=org.freedesktop.Notifications
to see all traffic going in and out of the notification server, or use a tool like Bustle. For debugging progress reporting, the interfaces instead are org.kde.kuiserver, org.kde.JobViewServer, and org.kde.JobViewV2. There’s also a debug logging category org.kde.plasma.notifications that you can enable through kdebugsettings.
Thats sounds awesome, thank you a lot!
Great great work, congratulations. The Not Disturb option, awesome. Thanks for sharing your work!
Wow! Fantastic work! Just when you thought Plasma could not get any better – then this! Awesome!
Thank you!
Awesome!
Is it able to work on a sidebar like in the picture from the wiki ( https://community.kde.org/File:Notification-Sidebar.jpeg )???
You can place it in a wide vertical panel e.g. auto-hidden on the right side of the screen. There’s no option (yet) to make it open as a sidebar when clicking it, unfortunately.
Nice!
We can already place the widget now, but we only get the Notification Icon, not the notifications themselves.
If this new update does allow to show the notifications themselves on a side bar then: “ME WANTS!!!”
For the rest we have Switch Panel Button ( https://www.opendesktop.org/p/1289173/ ) that allows to open the sidebar when clicking a button.
It would be great to have a bit more of a margin on the left side of the notifications. The words begin uncomfortably close to the edge. A bit more padding/margin would make it look really really good.
Apart from that, excited to try this out!
Looks very nice, awesome work! Thank you!
Excellent job!
Nice, however the text is way to close to the border.
I disagree. The old popups were way too wide and these are much more compact and less in the way as a result.
Why make them compact? Peronally, i think they look better with more space around. Easier to differentiate from background text in light themes
Hey, looks great!
Where shall I open an issue when I get multiple notifications for one SMS? Is it a KDE Connect issue or something wrong with KDE Plasma?
Privacy Policy: Could you please add the info, that you are using Google Fonts? Ideally, you remove it right away.
This would be KDE Connect’s problem to solve, please file a bug report there!
I wanted to but I can’t figure out this WordPress stuff… I hoped that their “GDPR update” would add a simple checkbox to the default theme to stop. I don’t want to tamper with the HTML myself.
Can you check again? It shouldn’t load Google Fonts anymore.
Wow, nice. Thanks for the quick reply and removal. Google Fonts is gone now: Bravo!
Where is the right place?
https://invent.kde.org/kde/kdeconnect-kde/issues
https://bugs.kde.org/buglist.cgi?component=android-application
https://bugs.kde.org/buglist.cgi?component=plasmamobile-application&product=kdeconnect
https://phabricator.kde.org/project/board/159/
I guess https://bugs.kde.org/buglist.cgi?component=common&list_id=1618691&product=kdeconnect&resolution=— would be it as it’s probably a combination of Android app and Plasma side that needs fixing, so “common” would be fine.
Super excited to try this out!
My first reaction: “Another notification rewrite? C’mon!”
After reading all the post: “Wow, that’s amazing, I want it NOW!”
i have notifications turned off in the systray and a standalone notification widget. i also have the system setup so when i transfer files i get the desktop popup instead of the notification system travling the progress. i’d like to know if my current setup will affected and if so how. thanks
The settings have been shifted and you might need to configure them again in the new settings module. However, standalone notification widget is still supported (and even better now) and disabling both notification and task manager job progress in settings will still result in the legacy fallback dialog in the application.
Can’t wait for the 5.16 update :).
Will the Thunderbird notification finally opening messages?
In the past, Thunderbird had own notifications and I could click on showed the message to jump to it. After Thunderbird started using Plasma native notifications it is no longer possible (no link). I hope the new notifications will fix it.
No, that’s Thunderbird’s task to set a default action on the popup.
Since it annoys me as well, I once poked its source code and found where it’s sending notifications. I didn’t have the time to read into the code enough to adjust it accordingly, though, especially since it seemed quite entangled with Firefox website notification handling.
Feel free to file a bug report against Thunderbird so they are aware of this oversight.
Super cool feature! Thank you so much for this great update!
I miss one ting a lot with the current notification popup: I can not select on which display in multi-monitor systems the popup should be displayed. I can select the position on the screen but not the screen itself. It would be nice to have this since I have some fellscreen app running on primary display (i.e. fullscreen Youtube video) and the popup would be nicer to have on the other screen. Mazbe someone would also find it useful to have the notification shown on all sxreens (for example high-priority notifications could have this set by default)
The notifications show up on whatever screen the notification plasmoid is on. In case there are multiple plasmoids the primary screen panel takes precedence.
Amazing work. However, I am having trouble previewing the amazing work because the images are so small. Would you mind attaching larger images next time? My eyes thank you in advance.
In the last update of the notification subsystem, the history of snap applications is no longer preserved, in particular with the telegram messenger. How can I return this functionality?
How can I change notification font size and color?
https://imgur.com/vSjPRJ6
Another example: when I unpack zip file. Text is small and in default color with notification: “unpacking files” and after that “unpacking files finished”. I want to change font size and color of both this texts.
Did you ever find out how to do this? Since I upgraded to KDE 5.24.4 I get dark grey notifications on a black background. Almost completely illegible.