elenapan / dotfiles

There is no place like ~/
GNU General Public License v2.0
3.48k stars 178 forks source link

Suggested manual intervention to enable volume reporting with pipewire in evil. #176

Open ArvinZaker opened 1 year ago

ArvinZaker commented 1 year ago

Hi,

The evil/volume.lua script is made with only PulseAudio in mind. To allow it to work with pipe wire, I have found that this manual intervention of the code brings back the volume reporting function. It works even when multiple PipeWire sinks exist (unlike the manual intervention recommended by #149:

In evil/volume.lua remove:

    awful.spawn.easy_async_with_shell("pacmd list-sinks | awk '/\\* index: /{nr[NR+7];nr[NR+11]}; NR in nr'", function(stdout)

And replace it with:

    awful.spawn.easy_async_with_shell("pactl list sinks | tail -n $(pactl list sinks | awk '/RUNNING/{print NR+1}')", function(stdout)

I suggest that this manual intervention be added to the wiki or that the code is changed to accommodate PipeWire systems.