marioortizmanero / polybar-pulseaudio-control

A feature-full Polybar module to control PulseAudio
MIT License
482 stars 50 forks source link

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

Closed fabian-thomas closed 5 months ago

fabian-thomas commented 6 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 6 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 6 months ago

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

nchachereau commented 6 months ago

Oh that's kind! Thank you!