From 560a9f419dea85a7d03cab71f8493fd677c41777 Mon Sep 17 00:00:00 2001 From: Ian Ribeiro Date: Fri, 18 Sep 2026 00:42:19 -0300 Subject: [PATCH] WM (Linux): supports Umbriel version detection (#2594) --- CHANGELOG.md | 1 + src/detection/wm/wm_linux.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64df0391b..d18d3abb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/detection/wm/wm_linux.c b/src/detection/wm/wm_linux.c index a22a513fb..b04bececa 100644 --- a/src/detection/wm/wm_linux.c +++ b/src/detection/wm/wm_linux.c @@ -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); }