On Mon, May 23, 2022 at 06:39:22PM +0200, Mikau wrote:
> On May 23, 2022 10:21:39 AM GMT+02:00, Hiltjo Posthuma 
> <hil...@codemadness.org> wrote:
> >On Sun, May 22, 2022 at 04:22:54PM +0300, Otto Modinos wrote:
> >> Several programs and terminal emulators (see links further down), are
> >> using this variable to indicate truecolor support.
> >> 
> >> https://github.com/termstandard/colors
> >> https://gitlab.com/gnachman/iterm2/-/issues/5294
> >> https://codeberg.org/dnkl/foot/wiki#24-bit-color-support-in-emacs
> >> https://neovim.io/doc/user/term.html#true-color
> >> 
> >> ---
> >>  st.c | 1 +
> >>  1 file changed, 1 insertion(+)
> >> 
> >> diff --git a/st.c b/st.c
> >> index 6ba467d..7586e0f 100644
> >> --- a/st.c
> >> +++ b/st.c
> >> @@ -697,6 +697,7 @@ execsh(char *cmd, char **args)
> >>    setenv("SHELL", sh, 1);
> >>    setenv("HOME", pw->pw_dir, 1);
> >>    setenv("TERM", termname, 1);
> >> +  setenv("COLORTERM", "truecolor", 1);
> >> 
> >>    signal(SIGCHLD, SIG_DFL);
> >>    signal(SIGHUP, SIG_DFL);
> >> -- 
> >> 2.36.1
> >> 
> >> 
> >
> >Hi Otto,
> >
> >urxvt sets it aswell, but it sets it here to:
> >
> >     COLORTERM=rxvt-xpm
> >
> >So maybe it should then be?:
> >
> >     COLORTERM=st
> >
> >Any objections to such a change?
> >
> 
> There doesn't seem to be a standard value to set it to. Midnight Commander 
> (and s-lang) check for the values "truecolor" and "24bit".
> 
> mc:
>     colorterm = getenv ("COLORTERM");
>     if (colorterm == NULL || (strcmp (colorterm, "truecolor") != 0 && strcmp 
> (colorterm, "24bit") != 0))
>     ...
> 
> I think using "truecolor" will have the best compatibility.
> Also, I don't see a reason to identify st in the COLORTERM variable anyway. 
> There's already TERM for identifying the terminal type, and st's handling of 
> 24bit color is the same as every other terminal using COLORTERM="truecolor".
> 
> -Mikau
> 

OK thanks for the testing and replies so far. For now I won't add this then.

-- 
Kind regards,
Hiltjo

Reply via email to