DE: fix KDE version detection on Fedora

This commit is contained in:
李通洲
2023-06-11 09:53:43 +08:00
parent c7a11e050c
commit 977da91aa6
+10
View File
@@ -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"));
}