Hide Audio Devices from System Tray

Maybe you can use WirePlumber to disable the output node.

To get rid of “HDMI2” and “HDMI3” (the 5.1 surround sound outputs at the Pro-Audio profile that are in my case not even connected) for example I use the following wireplumber rule:

# ALSA node property overrides for machine hardware /usr/share/wireplumber/wireplumber.conf.d/99-alsa-rules.comf

monitor.alsa.rules = [
  {
    matches = [
      {
        object.path = "alsa:acp:NVidia:2:playback"
      }
    ]
    actions = {
      update-props = {
        node.disabled = true
      }
    }
  }
  {
    matches = [
      {
        object.path = "alsa:acp:NVidia:3:playback"
      }
    ]
    actions = {
      update-props = {
        node.disabled = true
      }
    }
  }
]

or even rename a specific output;

...
  {
    matches = [
      {
        node.name = "alsa_output.pci-0000_00_1f.3.analog-stereo"
      }
    ]
    actions = {
      update-props = {
        node.nick = "Laptop Stereo"
      }
    }
  }
...

(the current system-tray/Audio plasmoid uses “node.nick” for the Name shown)

The only requirement (for the rule “match”) is that both output sinks have at least one different / unique to them property.
See properties section of pactl list sinks output.

If both outputs have identical properties and only distinguished by, for example, “Active Port” you are out of luck. Or at least I have not figured out how to do that in such a case (yet).

1 Like