[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f0f54f62-1c76-4fb8-8e8e-b2a11049b156@gedalya.net>
Date: Thu, 23 May 2024 06:16:51 +0800
From: Gedalya <gedalya@...alya.net>
To: Stephen Hemminger <stephen@...workplumber.org>,
Dragan Simic <dsimic@...jaro.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] [resend] color: default to dark background
On 5/23/24 5:33 AM, Stephen Hemminger wrote:
> The color handling of iproute2 was inherited from other utilities such as vim.
> There doesn't appear to be any library or standardization, all this ad-hoc.
Looking at the vim code, and playing around with the program, I
have a few observations.
The snippet you quoted isn't doing anything brilliant. It just
assumes that certain types of terminals are dark, regardless of
the implementation and configuration. All you can really say is
that terminals are often dark which is what I was saying here in
the first place.
I'm not seeing any justification for assuming dark in certain
cases and light otherwise. The code just happens to be that way.
More importantly, vim does happen to actually work. So far I was
only able to get it to show dark blue on a black background by
setting TERM=ansi.
The results are what is important. Vim has its own various color
palettes and it's a serious full-screen app, uses the terminfo
library, its support for terminals is much more complex than just
two palettes. One way or another, we need to fix this, probably
not by linking against ncurses, and "assuming terminal backgrounds
are light" isn't the nugget of wisdom vim has to offer.
Powered by blists - more mailing lists