dunst-project / dunst

Lightweight and customizable notification daemon
https://dunst-project.org
Other
4.42k stars 338 forks source link

Feature request: dunstctl close notifications based on conditions #1242

Open febs opened 6 months ago

febs commented 6 months ago

It would be handy to be able to se dunstctly to only close notifications pertaining a single app, or all the notifications containing a specified text/pattern.

also apparently the history-rm command is not documented in the docs folder of the source code.

Thanks!

bynect commented 4 months ago

This is an interesting idea. As a future reference: It can be done by defining a new dbus method similar to NotificationCloseLast that accepts a string and matches against that. Maybe two different methods, one matching the title and the other the body/everything.

Anyway if I get some spare time I'll try it

zappolowski commented 2 months ago

I have a proposal for a (I think) more extensible approach: provide a new method for listing currently displayed notifications (like NotificationListHistory; this could be reused by just using a different queue to pick from). Then a client could use that output to apply its own rules for filtering and then issue calls to the already existing CloseNotification.