greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.88k stars 477 forks source link

sound block: volume doesn't update #2083

Open Dieterbe opened 2 months ago

Dieterbe commented 2 months ago

i used to use pipewire-pulse, but got rid of that, as i don't seem to need it. so now i use pure pipewire.

https://docs.rs/i3status-rs/latest/i3status_rs/blocks/sound/index.html says:

This block displays the volume level (according to PulseAudio or ALSA). Right click to toggle mute, scroll to adjust volume. Requires a PulseAudio installation or alsa-utils for ALSA. Note that if you are using PulseAudio commands (such as pactl) to control your volume, you should select the "pulseaudio" (or "auto") driver to see volume changes that exceed 100%.

i don't have pulseaudio installed, but i do have alsa-utils installed. (and libpulse which i think is how apps talk to pipewire, which implements the pulseaudio API)

when i scroll, it changes the volume as expected, however the number shown doesn't update. (i'm not trying to go over 100%, in fact i start from 100 and go down. i used to be able to go over 100 with pulseaudio, but it doesn't seem to possible with the pure pipewire stack, but i can look into that separately)

my config is trivial:

[[block]]
block = "sound"
[[block.click]]
button = "left"
cmd = "i3-msg workspace 8"
bim9262 commented 2 months ago

Can you test adding driver = "pulseaudio" if you get an error it means you've been falling back to alsa?

Dieterbe commented 2 months ago

Can you test adding driver = "pulseaudio" if you get an error it means you've been falling back to alsa?

indeed, when i add that, it shows this:

    {
        "full_text": "pulseaudio connection failed with error: Failed to connect to pulseaudio context. Cause: Access denied ",
        "color": "#FFFFFFFF",
        "background": "#F44336FF",
        "name": "6",
        "instance": "6:",
        "separator": false,
        "separator_block_width": 0,
        "markup": "pango"
    },