Volume (and Alsa) plugin fails to recognize some options
eppolito opened this issue · comments
The following options (everything related to configuring the appearance of <status>
) are unrecognized by both the Volume
and Alsa
plugins for me.
--on
and-O
for the "on" string--off
and-o
for the "off" string--onc
and-C
for coloring the "on" string--offc
for coloring the "off" string
Here is a minimal config which exhibits this behaviour.
Config {
commands = [
Run Alsa "default" "Master" [
"--template", "Vol <volume> <status>"
, "--off", "yellow"
, "--offc", "yellow"
, "--on", "yellow"
, "--onc", "yellow"
, "-o", "yellow"
, "-c", "yellow"
, "-O", "yellow"
, "-C", "yellow"
]
]
, sepChar = "%"
, alignSep = "}{"
, template = "}%alsa:default:Master%{"
}
I suspect the issue may live in src/Xmobar/Plugins/Monitors/Volume.hs
. Note that the "-c"
option does not throw an unrecognized option
because "-c"
is one of the default options. Could this be part of the problem? I haven't looked at the definition of parseOptsWith
, but I wonder if it stops parsing once it sees a duplicated option.
Thanks for taking the time to read this, and for writing such a great piece of software! I love xmobar
:)
Interesting, I completely misunderstood how "--"
is handled here. I thought options after this would be passed directly to the command run by the monitor on the system... Seems this was a 10t error on my part.
Thanks so much for your help!