[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240522155234.6180d92d@hermes.local>
Date: Wed, 22 May 2024 15:52:34 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Gedalya <gedalya@...alya.net>
Cc: Dragan Simic <dsimic@...jaro.org>, netdev@...r.kernel.org
Subject: Re: [PATCH] [resend] color: default to dark background
On Thu, 23 May 2024 06:11:56 +0800
Gedalya <gedalya@...alya.net> wrote:
> 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 curses app, 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.
>
Overall, I am concerned that changing this will upset existing users.
Not that it is impossible, just need more consensus and testing.
Powered by blists - more mailing lists