mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-13 06:50:54 +01:00
Windows: add basic support for msys2
This commit is contained in:
1 parent
145e09d164
commit
eaa4230bf5
8 files changed
+52
-19
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "fastfetch.h"
|
||||
#include "detection/host/host.h"
|
||||
#include "detection/terminalshell.h"
|
||||
#include "common/io.h"
|
||||
#include "common/parsing.h"
|
||||
@@ -149,17 +150,18 @@ static void getTerminalFromEnv(FFTerminalShellResult* result)
|
||||
getenv("KONSOLE_VERSION") != NULL
|
||||
)) term = "konsole";
|
||||
|
||||
//MacOS
|
||||
//MacOS, mintty
|
||||
if(!ffStrSet(term))
|
||||
term = getenv("TERM_PROGRAM");
|
||||
|
||||
//We are in WSL but not in Windows Terminal
|
||||
if(!ffStrSet(term) && (
|
||||
getenv("WSLENV") != NULL ||
|
||||
getenv("WSL_DISTRO") != NULL ||
|
||||
getenv("WSL_INTEROP") != NULL
|
||||
))
|
||||
if(!ffStrSet(term))
|
||||
{
|
||||
const FFHostResult* host = ffDetectHost();
|
||||
if(ffStrbufCompS(&host->productName, FF_HOST_PRODUCT_NAME_WSL) == 0 ||
|
||||
ffStrbufCompS(&host->productName, FF_HOST_PRODUCT_NAME_MSYS) == 0)
|
||||
term = "conhost";
|
||||
}
|
||||
|
||||
//Normal Terminal
|
||||
if(!ffStrSet(term))
|
||||
|
||||
Reference in new issue
Block a user