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

wireplumber states not working #3672

Open
slippuu opened this issue Oct 8, 2024 · 1 comment
Open

wireplumber states not working #3672

slippuu opened this issue Oct 8, 2024 · 1 comment
Labels
audio battery bug Something isn't working custom

Comments

@slippuu
Copy link

slippuu commented Oct 8, 2024

Unsure if it's me not being able to read the documentation clearly or if it's a bug.

On Module/WirePlumber it mentions that States can be used, with a link to States.

The page mentions that formatting can be done on State via format-<name> (which I'd assume could be done for battery as "format-critical": <format>" etc).

I've tried to adjust WirePlumber to use different icons depending on the volume (as just using format-icons doesn't give me the values I want).

    "wireplumber": {
        "states": {
            "high": 75,
            "med": 50,
            "low": 25,
            "off": 0
        },
        "format-high": " |{volume}%",
        "format-med": " |{volume}%",
        "format-low": " |{volume}%",
        "format-off": " |{volume}%",
        "format-muted": " | 0%",
        "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
    }

All I get showing on my Waybar is the default format {volume}%. When muting, format-muted works fine, it's just the custom states that don't seem to be taking hold.

Results:

  • Volume above 75: 75%
  • Volume above 50: 50%
  • Volume above 25: 25%
  • Volume above 0: 0%
  • Volume after set-mute command:  | 0%
@github-actions github-actions bot added audio battery bug Something isn't working custom labels Oct 8, 2024
@slippuu
Copy link
Author

slippuu commented Oct 8, 2024

Also worth noting, potentially, that in the style.css file, it is working as intended. Using dummy colours has the intended effect of changing the module text colour.

#wireplumber.high {
    color:green;
}
#wireplumber.med {
    color:yellow;
}
#wireplumber.low {
    color:orange;
}
#wireplumber.muted, #wireplumber.off {
    color:red;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio battery bug Something isn't working custom
Projects
None yet
Development

No branches or pull requests

1 participant