mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:14:37 +02:00
Terminal (Linux): support weston-terminal version detection
This commit is contained in:
@@ -408,6 +408,21 @@ FF_MAYBE_UNUSED static bool getTerminalVersionLxterminal(FFstrbuf* exe, FFstrbuf
|
||||
return version->length > 0;
|
||||
}
|
||||
|
||||
FF_MAYBE_UNUSED static bool getTerminalVersionWeston(FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* version)
|
||||
{
|
||||
// weston-terminal doesn't report a version, use weston version instead
|
||||
if(ffProcessAppendStdOut(version, (char* const[]){
|
||||
"weston",
|
||||
"--version",
|
||||
NULL
|
||||
})) return false;
|
||||
|
||||
//weston 8.0.0
|
||||
ffStrbufSubstrAfterFirstC(version, ' ');
|
||||
|
||||
return version->length > 0;
|
||||
}
|
||||
|
||||
static bool getTerminalVersionContour(FFstrbuf* exe, FFstrbuf* version)
|
||||
{
|
||||
const char* env = getenv("TERMINAL_VERSION_STRING");
|
||||
@@ -536,6 +551,9 @@ bool fftsGetTerminalVersion(FFstrbuf* processName, FF_MAYBE_UNUSED FFstrbuf* exe
|
||||
if(ffStrbufIgnCaseEqualS(processName, "lxterminal"))
|
||||
return getTerminalVersionLxterminal(exe, version);
|
||||
|
||||
if(ffStrbufIgnCaseEqualS(processName, "weston-terminal"))
|
||||
return getTerminalVersionWeston(exe, version);
|
||||
|
||||
if(ffStrbufIgnCaseEqualS(processName, "urxvt") ||
|
||||
ffStrbufIgnCaseEqualS(processName, "urxvtd") ||
|
||||
ffStrbufIgnCaseEqualS(processName, "rxvt") ||
|
||||
|
||||
Reference in New Issue
Block a user