[hackers] [st][PATCH] support COLORTERM env variable

From: Otto Modinos <ottomodinos_AT_gmail.com>
Date: Sun, 22 May 2022 16:22:54 +0300

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
_AT_@ -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
Received on Sun May 22 2022 - 15:22:54 CEST

This archive was generated by hypermail 2.3.0 : Sun May 22 2022 - 15:36:30 CEST