Re: [PATCH v4l-utils 0/2] v4l2-compliance colors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2019-04-08 at 12:44 +0200, Hans Verkuil wrote (paraphrased):
> On 4/8/19 12:28 PM, Mauro Carvalho Chehab wrote (paraphrased):
[...]
> > > [I hate colors]
> > [I love colors]
> I could live with [compromise]

Sorry for opening that can of worms :-)

How about doing something similar to 'ls':

- an environment variable V4L_COLORS which, if not set, defaults to
  V4L_COLORS="ok=32:warn=1:fail=1;31"
- an option --color=always|never|auto, which if not set, defaults to
  auto (check isatty())
- to disable colors by default, set V4L_COLORS to "ok=0:warn=0:fail=0"

This would allow to pipe colors into non-terminal stdout like less -R if
desired, or quickly disable colors with --color=never.
The pattern could be extended to include dvbv5 log levels or fe tool
quality levels.

Or alternatively, V4L_COLOR=always|never|auto for easier configuration,
but with a fixed color scheme?

regards
Philipp



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux