Filtering notifications

I’ve been happily running XMonad as my “desktop environment” for years.

Recently I tried to add some form of feedback to the behaviour of the volume and brightness control keys on my keyboard, which led me to install libnotify and wired. This has unleashed a deluge of notifications, the vast majority of which are distractions which I do not want to be breaking my concentration. I just want an indication of the volume, after having pressed a volume-control key, and maybe a very few other selected notifications from among those which have not been reaching me until now.

What would be a good way to filter notification programmatically on NixOS?

1 Like

The underlying system is a simple dbus api for notifications. The dbus itself isn’t really built to permit filtering or anything, the notifications will simply be broadcast to anything listening for these events.

This means that the service listening for the notifications needs to be what implements a filter of some kind, in your case wired. It however doesn’t seem to implement such a feature. E.g. dunst does.

Yes, I’m coming around to the conclusion that dunst might be the way to go.