WM (Linux): supports Umbriel version detection (#2594)

This commit is contained in:
Ian Ribeiro
2026-09-18 00:42:19 -03:00
committed by GitHub
parent 70d2dd37a6
commit 560a9f419d
2 changed files with 16 additions and 0 deletions
+1
View File
@@ -51,6 +51,7 @@ Features:
* Improved reliability of fastfetch's built-in HTTP client. (PublicIP, Weather)
* It now supports custom ports and can properly handle chunked transfer encoding.
* It is designed for minimal resource usage and fast performance. It does not support full HTTP features like HTTPS. Users can always use the `Command` module with `curl` to achieve similar functionality.
* Added Umbriel wayland compositor version detection (WM, Linux)
Bugfixes:
* Fixed Base64 encoding producing incorrect output for some inputs. (General)
+15
View File
@@ -168,6 +168,17 @@ static const char* getNiri(FFstrbuf* result) {
return "Failed to run command `niri --version`";
}
static const char* getUmbriel(FFstrbuf* result) {
if (ffProcessAppendStdOut(result, (char* const[]) { "umbriel", "--version", nullptr }) == nullptr) { // umbriel 0.1.0 (7a448abe550e)
ffStrbufSubstrAfterFirstC(result, ' ');
ffStrbufSubstrBeforeLastC(result, '(');
ffStrbufTrimRightSpace(result);
return nullptr;
}
return "Failed to run command `umbriel --version`";
}
static const char* getWeston(FFstrbuf* result) {
FF_STRBUF_AUTO_DESTROY path = ffStrbufCreate();
const char* error = ffFindExecutableInPath("weston", &path);
@@ -327,6 +338,10 @@ const char* ffDetectWMVersion(const FFstrbuf* wmName, FFstrbuf* result, [[maybe_
return getNiri(result);
}
if (ffStrbufEqualS(wmName, "umbriel")) {
return getUmbriel(result);
}
if (ffStrbufEqualS(wmName, "weston")) {
return getWeston(result);
}