marioortizmanero / polybar-pulseaudio-control

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

Change to the next existing audio-device #2

Closed kronn closed 5 years ago

kronn commented 5 years ago

In cases, where audio-devices come and go during the uptime, gaps in the indices of pulseaudio indices occur. This change loops over the existing indices with no knowledge of continuity or so.

This happens on my machine when the bluetooth-headset disconnects due to distance. So, every time I get a coffee/tea. This change - working on my machine - addresses that.

kronn commented 5 years ago

Well, since shell-scripts are good as long as they achieve their goal, I'd say: it was good. I just changed the scope, which made a different solution necessary. under normal circumstances, your version would still be perfect. :-)

Thanks for the project BTW, this is exactly what I was searching for.