]> git.alsa-project.org Git - alsa-utils.git/commit
alsamixer: Allow setting the default background color in config
authorTakashi Iwai <tiwai@suse.de>
Wed, 20 Oct 2021 15:13:35 +0000 (17:13 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 20 Oct 2021 15:24:35 +0000 (17:24 +0200)
commit5d4442b2cfe967c44b5cd74fccb62d1fb4095b19
treebe5a0777261b7a6bed8408bfb7747a717bfeb75b
parent31820c5f239fca2de12c8d1a7327ccf995188f33
alsamixer: Allow setting the default background color in config

The recent commit c867aa8a84a7 ("alsamixer: use background color
instead of COLOR_BLACK") changed the behavior of alsamixer to take the
system default background color instead of black.  This caused
problems on the terminal setups that have bright background colors,
e.g. yellow is very hard to read.

It could be "fixed" by setting up the color configurations in
~/.config/alsamixer.rc, but this needs to change the all colors in
every element, which is pretty cumbersome.  Instead, this patch
extends the config set command to allow user to specify the default
background color.  A user like me can create their own
~/.config/alsamixer.rc file containing the line

  set background black

and the old good black background is back again.

Note that, for achieving the above, we also had to shuffle the
function call order, to parse the config at first, then initialize
curses.  This shouldn't matter for other behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
alsamixer/alsamixer.1
alsamixer/cli.c
alsamixer/colors.c
alsamixer/colors.h
alsamixer/configparser.c