From: Stephen Hemminger <stephen@networkplumber.org>
To: Dragan Simic <dsimic@manjaro.org>
Cc: Gedalya <gedalya@gedalya.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] [resend] color: default to dark background
Date: Wed, 22 May 2024 14:33:54 -0700 [thread overview]
Message-ID: <20240522143354.0214e054@hermes.local> (raw)
In-Reply-To: <2866a9935b3fa3eafe51625b5bdfaa30@manjaro.org>
On Wed, 22 May 2024 23:02:37 +0200
Dragan Simic <dsimic@manjaro.org> wrote:
> On 2024-05-22 23:01, Gedalya wrote:
> > On 5/23/24 4:57 AM, Stephen Hemminger wrote:
> >> Why? What other utilities do the same thin?
> >
> > I'm truly sorry, I don't understand the question
>
> Basically, you need to provide the patch description.
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.
In current vim:
char_u *
term_bg_default(void)
{
#if defined(MSWIN)
// DOS console is nearly always black
return (char_u *)"dark";
#else
char_u *p;
if (STRCMP(T_NAME, "linux") == 0
|| STRCMP(T_NAME, "screen.linux") == 0
|| STRNCMP(T_NAME, "cygwin", 6) == 0
|| STRNCMP(T_NAME, "putty", 5) == 0
|| ((p = mch_getenv((char_u *)"COLORFGBG")) != NULL
&& (p = vim_strrchr(p, ';')) != NULL
&& ((p[1] >= '0' && p[1] <= '6') || p[1] == '8')
&& p[2] == NUL))
return (char_u *)"dark";
return (char_u *)"light";
#endif
}
next prev parent reply other threads:[~2024-05-22 21:33 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 [this message]
2024-05-22 22:16 ` Gedalya
[not found] ` <5b8dfe40-e72e-4310-85b5-aa607bad1638@gedalya.net>
2024-05-22 22:52 ` Stephen Hemminger
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=20240522143354.0214e054@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).