Bug 454076

Summary: Filter out notifications based on their content using keywords or regular expressions
Product: [Plasma] plasmashell Reporter: Raphaël Jakse <raphael.kde>
Component: NotificationsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: kde, kdelibs-bugs-null, nate, nicolas.fella
Priority: NOR    
Version First Reported In: 5.24.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Raphaël Jakse 2022-05-20 09:20:15 UTC
SUMMARY

I'd like to be able to define sub-strings, keywords or regular expressions that will make Plasma not show notifications whose content match the filter. 

Use case: I'm using a chat application and people are celebrating something on some days (say, a birthday or an anniversary). These messages are warm and very much welcome. However, they don't require immediate attention and notifications for these messages are just noise.

The chat application doesn't support such filtering. It would also make sense to have a centralized place to define such filters. Ideally, one would be able to set a filter for a particular application, or restricted to some notification title. I'm imagining something like KWin's feature that allows to define fine-tuned window rules to match windows.

OBSERVED RESULT

I'm notified for these messages that don't require immediate attention.

EXPECTED RESULT

I can define some keywords matching these messages to block these notifications. The notifications could still be shown in the notification tray, but don't produce a popup.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220518
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

Related: https://github.com/vector-im/element-web/issues/22291
Comment 1 Nate Graham 2022-05-23 16:09:16 UTC
This seems like a very niche feature that mostly lets you manually work around bugs in notification-sending apps. Not sure how likely it is that it'll be implemented. Probably a "patches welcome" sort of thing.