terminal-util: get_color_mode checks COLORTERM
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
51cef2b56f
commit
a5efbf468c
@@ -1278,6 +1278,11 @@ ColorMode get_color_mode(void) {
|
||||
/* We only check for the presence of the variable; value is ignored. */
|
||||
cached_color_mode = COLOR_OFF;
|
||||
|
||||
else if (STRPTR_IN_SET(getenv("COLORTERM"),
|
||||
"truecolor",
|
||||
"24bit"))
|
||||
cached_color_mode = COLOR_24BIT;
|
||||
|
||||
else if (getpid_cached() == 1)
|
||||
/* PID1 outputs to the console without holding it open all the time.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user