summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2024-08-12 12:55:16 -0400
committerMatt Hunter <m@lfurio.us>2026-02-06 00:29:05 -0500
commitcd42d5df504526f806c1e511db5859b4c2773668 (patch)
tree675b12e710fb5a3fba5bae32d5eda808aa859e35
parent85bc7085d4e70a3298f2595d55f2a5a3bdcb06ab (diff)
downloadst-cd42d5df504526f806c1e511db5859b4c2773668.tar.gz
st-cd42d5df504526f806c1e511db5859b4c2773668.zip
patch: colorterm
Support COLORTERM env variable 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 This patch is taken manually from the suckless mailing list, as it was never applied to mainline st. https://lists.suckless.org/hackers/2205/18350.html
-rw-r--r--st.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/st.c b/st.c
index 8e57991..291859e 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);