mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
TerminalShell: support ConEmu version detection
This commit is contained in:
@@ -205,6 +205,16 @@ static bool getTerminalVersionWindowsTerminal(FFstrbuf* exe, FFstrbuf* version)
|
||||
return getFileVersion(exe->chars, version);
|
||||
}
|
||||
|
||||
static bool getTerminalVersionConEmu(FFstrbuf* exe, FFstrbuf* version)
|
||||
{
|
||||
ffStrbufSetS(version, getenv("ConEmuBuild"));
|
||||
|
||||
if(version->length)
|
||||
return true;
|
||||
|
||||
return getFileVersion(exe->chars, version);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool fftsGetTerminalVersion(FFstrbuf* processName, FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* version)
|
||||
@@ -237,6 +247,9 @@ bool fftsGetTerminalVersion(FFstrbuf* processName, FF_MAYBE_UNUSED FFstrbuf* exe
|
||||
if(ffStrbufIgnCaseEqualS(processName, "WindowsTerminal.exe"))
|
||||
return getTerminalVersionWindowsTerminal(exe, version);
|
||||
|
||||
if(ffStrbufStartsWithIgnCaseS(processName, "ConEmuC"))
|
||||
return getTerminalVersionConEmu(exe, version);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
Reference in New Issue
Block a user