mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Terminal (Linux): support ptyxis version detection
This commit is contained in:
@@ -499,6 +499,20 @@ static bool getTerminalVersionKitty(FFstrbuf* exe, FFstrbuf* version)
|
||||
//kitty 0.21.2 created by Kovid Goyal
|
||||
return getExeVersionGeneral(exe, version);
|
||||
}
|
||||
|
||||
static bool getTerminalVersionPtyxis(FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* version)
|
||||
{
|
||||
if(ffProcessAppendStdOut(version, (char* const[]) {
|
||||
"ptyxis",
|
||||
"--version",
|
||||
NULL
|
||||
}) != NULL)
|
||||
return false;
|
||||
|
||||
ffStrbufSubstrBeforeFirstC(version, '\n');
|
||||
ffStrbufSubstrAfterFirstC(version, ' ');
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -595,6 +609,9 @@ bool fftsGetTerminalVersion(FFstrbuf* processName, FF_MAYBE_UNUSED FFstrbuf* exe
|
||||
)
|
||||
return getTerminalVersionUrxvt(exe, version);
|
||||
|
||||
if(ffStrbufIgnCaseEqualS(processName, "ptyxis-agent"))
|
||||
return getTerminalVersionPtyxis(exe, version);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -331,6 +331,8 @@ static void setTerminalInfoDetails(FFTerminalResult* result)
|
||||
ffStrbufEqualS(&result->processName, "rxvt")
|
||||
)
|
||||
ffStrbufInitStatic(&result->prettyName, "rxvt-unicode");
|
||||
else if(ffStrbufStartsWithS(&result->processName, "ptyxis-agent"))
|
||||
ffStrbufInitStatic(&result->prettyName, "Ptyxis");
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user