Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for muted icons for pulseaudio devices/ports #3353

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

locked-out
Copy link
Contributor

This PR enables users to specify alternate pulseaudio icons for when a sink is muted.
For example, adding a headphone-muted entry into a format-icons object will use the corresponding icon when the current sink is a headphone port and is muted.
Users can also specify [current_sink_name]-muted, [port]-muted or default-muted icons

When not muted, behavior is unchanged.
When muted, icons are searched for in the following order:

  • [current_sink_name]-muted
  • [current_sink_name] (Existing behavior)
  • [default_source_name] (Existing behavior)
  • [port]-muted
  • [port] (Existing behavior)
  • default-muted
  • default (Existing behavior)

Feedback welcome, this is the least intrusive way I thought of to include this feature that I wanted personally.

Example config

  "pulseaudio": {
      "format": "{icon} {volume}%",
      "format-muted": "{icon} Muted",

      "format-icons": {
          "headphone":        "󰋋",
          "headphone-muted":  "󰟎",
          "portable":         "󰏲",
          "portable-muted":   "󰷯",
          "car":              "󰄋",
          "car-muted":        "󰸜",
          "default": ["", "", ""],
          "default-muted":    "󰸈"
      }
  }

Example results

20240612_18h11m18s_grim
20240612_18h11m15s_grim
20240612_18h11m02s_grim
20240612_18h10m58s_grim

@Alexays
Copy link
Owner

Alexays commented Jun 12, 2024

Nice, can you update the man and wiki?

@locked-out
Copy link
Contributor Author

Done 👍

@Alexays Alexays merged commit 79a6229 into Alexays:master Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants