Skip to content

Commit 8c91008

Browse files
Detect KDE plasma version more reliable
1 parent e79af7b commit 8c91008

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.1.0) # Threads::Threads
22

33
project(fastfetch
4-
VERSION 1.4.2
4+
VERSION 1.4.3
55
LANGUAGES C
66
)
77

src/detection/displayserver/wmde.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,15 @@ static void getKDE(FFDisplayServerResult* result)
9898
{
9999
ffStrbufSetS(&result->deProcessName, "plasmashell");
100100
ffStrbufSetS(&result->dePrettyName, "KDE Plasma");
101+
101102
ffParsePropFile(FASTFETCH_TARGET_DIR_USR"/share/xsessions/plasma.desktop", "X-KDE-PluginInfo-Version =", &result->deVersion);
103+
if(result->deVersion.length == 0)
104+
ffParsePropFile(FASTFETCH_TARGET_DIR_USR"/share/xsessions/plasma5.desktop", "X-KDE-PluginInfo-Version =", &result->deVersion);
105+
if(result->deVersion.length == 0)
106+
ffParsePropFile(FASTFETCH_TARGET_DIR_USR"/share/wayland-sessions/plasmawayland.desktop", "X-KDE-PluginInfo-Version =", &result->deVersion);
107+
if(result->deVersion.length == 0)
108+
ffParsePropFile(FASTFETCH_TARGET_DIR_USR"/share/wayland-sessions/plasmawayland5.desktop", "X-KDE-PluginInfo-Version =", &result->deVersion);
109+
102110
applyBetterWM(result, getenv("KDEWM"));
103111
}
104112

0 commit comments

Comments
 (0)