From 6acfc1b715bba3b4ace80ef8c815d814229e29b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 11 Jun 2023 09:53:43 +0800 Subject: [PATCH] DE: fix KDE version detection on Fedora --- src/detection/displayserver/linux/wmde.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/detection/displayserver/linux/wmde.c b/src/detection/displayserver/linux/wmde.c index db309b92a..a7ac96b8d 100644 --- a/src/detection/displayserver/linux/wmde.c +++ b/src/detection/displayserver/linux/wmde.c @@ -132,6 +132,16 @@ static void getKDE(const FFinstance* instance, FFDisplayServerResult* result) ffParsePropFileData(instance, "wayland-sessions/plasmawayland.desktop", "X-KDE-PluginInfo-Version =", &result->deVersion); if(result->deVersion.length == 0) ffParsePropFileData(instance, "wayland-sessions/plasmawayland5.desktop", "X-KDE-PluginInfo-Version =", &result->deVersion); + if(result->deVersion.length == 0) + { + if (ffProcessAppendStdOut(&result->deVersion, (char* const[]){ + "plasmashell", + "--version", + NULL + }) == NULL) // plasmashell 5.27.5 + ffStrbufSubstrAfterLastC(&result->deVersion, ' '); + } + applyBetterWM(result, getenv("KDEWM")); }