The notification popups stay too long on the screen in my opinion.
How to modify the number of seconds notifications are displayed?
I see no such option in any of the notification settings.
(Kubuntu 18.04 - Plasma 5.12.7)
This can be done by modifying the file
/usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationPopup.qml. So, open it in
Find the line
notificationTimer.interval = notification.expireTimeout and comment/change it to
notificationTimer.interval = 1 * 1000
1 is the number of seconds.
Test it with
notify-send "your notification"
The other answer is a successful hack, and I upvoted, but I have found a better one for some versions of KDE, and also add the instruction to refresh plasmashell, which also needs to be done for the other answer:
By design, here is the higher level place to actually edit the expireTimeout, which means you can leave NotificationPopup.qml alone, since it reads expireTimeout.
edit the expireTimeout line in ms, so for OP who wants a shorter time: If your version of KDE has the following file, set:
expireTimeout: 1000, in /usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/Jobs.qml
Unfortunately, in a more recent version of KDE Plasma, 5.12.7, I could not find that file. I found:
<entry name="expireTimeout" type="Int"> <label>The timeout after which the notification will be closed</label> <default>1000</default> </entry> in /usr/share/plasma/services/notifications.operations
but changing the default here did not work.
ALSO, in both my answer and the other one, you need to restart the plasmashell to see any effect. If you don't want to just reboot, use the below for KDE >= 5.10, or click on the source link below that for older versions.
kquitapp5 plasmashell (wait... for me it was around 30 seconds!) kstart5 plasmashell