marioortizmanero / polybar-pulseaudio-control

A feature-full Polybar module to control PulseAudio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Formatting the output with a fully configurable string

marioortizmanero opened this issue · comments

It'd be pretty neat to be able to fully configure the script's output with something like:

FORMAT='$VOL_ICON ${VOL_LEVEL}%  $SINK_ICON $SINK_NICKNAME'

It would of course have to use single quotes so that it's evaluated with eval "$FORMAT" later in the script when printing the output. This would get rid of SINK_ICON as a side effect. It would also have to be thoroughly documented.

This is related to #25, as it would also allow to configure whether to show the microphones, or the sinks.

This would be great, I was thinking about packaging it for the AUR (Arch User Repository, to be more easily installable on Arch linux) but soon realised it would lose configuration options, since at very least I'd have to choose them (e.g. the sensible icons from the readme) and sed them in place... or some sort of hacky env var override.

Configuring the format (and if possible, anything else too) from polybar's config would be ideal.

Unfortunately though, from the looks of it the only option is for the script itself to take a format argument, polybar's script module provides only %output%, there doesn't seem to be a way to offer more granularity.

Check out #26, it's what I was trying to figure out some time back. I can't work on it right now, so if you want to give it a go let me know and I'll review your changes. It shouldn't be too complicated.

Sure, I'd be happy to have a look shortly.

This can be closed now, it's been released in v2.1.0