mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Terminal (Linux): don't assume conhost in WSL
This commit is contained in:
@@ -208,6 +208,11 @@ static void getTerminalFromEnv(FFTerminalShellResult* result)
|
||||
getenv("WT_SESSION") != NULL ||
|
||||
getenv("WT_PROFILE_ID") != NULL
|
||||
)) term = "Windows Terminal";
|
||||
|
||||
//ConEmu
|
||||
if(!ffStrSet(term) && (
|
||||
getenv("ConEmuPID") != NULL
|
||||
)) term = "ConEmu";
|
||||
#endif
|
||||
|
||||
//Alacritty
|
||||
@@ -237,15 +242,6 @@ static void getTerminalFromEnv(FFTerminalShellResult* result)
|
||||
if(!ffStrSet(term))
|
||||
term = getenv("TERM_PROGRAM");
|
||||
|
||||
#ifdef __linux__
|
||||
if(!ffStrSet(term))
|
||||
{
|
||||
//We are in WSL but not in Windows Terminal
|
||||
if(getenv("WSL_DISTRO") != NULL || getenv("WSL_INTEROP") != NULL)
|
||||
term = "conhost";
|
||||
}
|
||||
#endif
|
||||
|
||||
//Normal Terminal
|
||||
if(!ffStrSet(term))
|
||||
term = getenv("TERM");
|
||||
|
||||
Reference in New Issue
Block a user