From: Stephen Hemminger <stephen@networkplumber.org>
To: Gedalya <gedalya@gedalya.net>
Cc: Dragan Simic <dsimic@manjaro.org>, netdev@vger.kernel.org
Subject: Re: [PATCH] [resend] color: default to dark background
Date: Wed, 22 May 2024 15:52:34 -0700 [thread overview]
Message-ID: <20240522155234.6180d92d@hermes.local> (raw)
In-Reply-To: <5b8dfe40-e72e-4310-85b5-aa607bad1638@gedalya.net>
On Thu, 23 May 2024 06:11:56 +0800
Gedalya <gedalya@gedalya.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.
next prev parent reply other threads:[~2024-05-22 22:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 18:43 [PATCH] [resend] color: default to dark background Gedalya Nie
2024-05-22 20:57 ` Stephen Hemminger
2024-05-22 21:01 ` Gedalya
2024-05-22 21:02 ` Dragan Simic
2024-05-22 21:33 ` Stephen Hemminger
2024-05-22 22:16 ` Gedalya
[not found] ` <5b8dfe40-e72e-4310-85b5-aa607bad1638@gedalya.net>
2024-05-22 22:52 ` Stephen Hemminger [this message]
2024-05-22 23:02 ` Gedalya
2024-05-22 23:41 ` Gedalya
2024-05-23 0:12 ` Dragan Simic
2024-05-23 0:14 ` Dragan Simic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240522155234.6180d92d@hermes.local \
--to=stephen@networkplumber.org \
--cc=dsimic@manjaro.org \
--cc=gedalya@gedalya.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.