mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-05 20:54:21 +01:00
WM (Linux): fixes swayfx version detection on NixOS
This commit is contained in:
@@ -129,11 +129,9 @@ static const char* getSway(FFstrbuf* result) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ffProcessAppendStdOut(result, (char* const[]) { path.chars, "--version", NULL }) == NULL) { // sway version 1.10
|
||||
ffStrbufSubstrAfterLastC(result, ' ');
|
||||
ffStrbufTrimRight(result, ')'); // swayfx
|
||||
ffStrbufTrimRightSpace(result);
|
||||
return NULL;
|
||||
FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate();
|
||||
if (ffProcessAppendStdOut(&buffer, (char* const[]) { path.chars, "--version", NULL }) == NULL) { // sway version 1.10
|
||||
return extractSwayVersion(buffer.chars, result->length, result) ? "Failed to parse sway version output" : NULL;
|
||||
}
|
||||
|
||||
return "Failed to run command `sway --version`";
|
||||
|
||||
Reference in New Issue
Block a user