Closed mntzrr closed 4 years ago
Hello!
Sorry for the delay, I was on holiday. What does this second volume value mean? Is it OK to ignore it? I can't reproduce it with my own setup, you might know more about it. Or is it just "front-left" and "front-right"? This is what I get:
$ pacmd list-sinks | grep -A 15 'index: '"1"'' | grep 'volume:' | grep -E -v 'base volume:'
volume: front-left: 19985 / 30% / -30.95 dB, front-right: 19985 / 30% / -30.95 dB
This script just returns the "front-left" volume currently, but I'm not sure if that's an issue for anyone really. Can you make sure we're talking about the same thing before I merge?
Thanks :)
I can't really reproduce it always. It used to happen randomly and often at the start of system and continuing from suspend/sleep. I am sure it has nothing to do with Polybar itself, I checked this by running the getCurVol
function in Terminal.
Once I introduced exit
in the AWK expression, this issue has never happened again. I believe it is a safe change. We are simply exiting after processing the third word on the first line. This would imply that the second value must be in the second line. In that case, that would be the base volume but that should have already been removed. I am not really sure why this is happening either since I don't modify the volume of either channels individually.
Welcome back! I hope you've had a good holiday :)
Okay seems good to me then, thanks for the PR. And have a good summer as well! :)
Occasionally, an integer value of 100, in addition of the active volume level, is returned which breaks all conditional statements where an integer expression is expected.