marioortizmanero / polybar-pulseaudio-control

A feature-full Polybar module to control PulseAudio
MIT License
466 stars 49 forks source link

Port stripped on white space (e.g., [Out] Speaker) #87

Closed fabian-thomas closed 2 months ago

fabian-thomas commented 2 months ago

When the port is something like "[Out] Speaker" the previous awk call only extracted "[Out]". Now it extracts all fields. I'm not sure if the modified awk call is the best one can use but it works.

Fixes #83

nchachereau commented 2 months ago

I had recently found a better solution (and was going to submit it before I saw yours): setting a different field separator (": " instead of simply whitespace), using the following modified awk call:

awk -F ": " '/Active Port: / {print $2}'

Maybe you could update your pull request?

This would fix #83.

fabian-thomas commented 2 months ago

Yep, let's do that. I added you as co-author.

nchachereau commented 2 months ago

Oh that's kind! Thank you!