Issues with Notification Volumes

Sorry about that!

I definitely know what caused this problem with Elisa, basically I was too broad with the matching rules (I matched everything KDE which is obviously dumb). As best I can tell, it seems like it’s safe to just remove the line mentioned above, and everything should still be covered by other match criteria.

On a similar note, I also noticed that this could mess with the volume meters for certain devices, so I’ve added a couple of lines to make sure we exclude those.

I also fixed a typo that I don’t think is causing any issue but while I’m doing version 0.2 … :wink:

Give that a shot, I expect it should work, but if you have a problem with an app being matched as a Notification like this, or vice versa, if you have an actual Notification which is not matched, let me know, and I’ll work on the rules.

Since I can’t edit the above post, posting the updated code here:

~/.config/pipewire/pipewire.conf.d/60-notifications-volume.conf:

# Notifications volume
context.modules = [
    {   name = libpipewire-module-loopback args = {
            capture.props = {
                media.class = Audio/Sink
                media.name = "Notifications"
                node.name = "Notifications"
                node.nick = "Notifications"
                node.description = "Notifications"
                node.passive = true
                node.virtual = false # Special treatment to always show this in volume control
            }
            playback.props = {
                node.name = "Notifications"
                node.description = "Notifications"
                node.linger = true
                node.passive = true
                channelmix.disable  = true
                channelmix.min-volume = 0.0 # Alter these if required
                channelmix.max-volume = 0.60 # Volume will be clamped to these levels
            } } }
]

node.rules = [
    # System notifications
    { matches = [ { media.role = "Notification"
                } { application.id = "org.freedesktop.libcanberra"
                    media.role = "!Test"
                    application.process.binary = "!systemsettings"
                } { application.name = "libcanberra"
                    media.role = "!Test"
                    application.process.binary = "!systemsettings"
                } { application.process.binary = "plasmashell"
                    media.name = "!PlasmaPA-VolumeMeter"
                    node.rate = "!1/25"
                } { application.name = "konsole"
    } ] actions = { update-props = {
        target.object = "Notifications"
    } } }
]
1 Like