Skip to content

Commit

Permalink
Detect KDE plasma version more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusDierheimer committed May 24, 2022
1 parent e79af7b commit 8c91008
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.1.0) # Threads::Threads

project(fastfetch
VERSION 1.4.2
VERSION 1.4.3
LANGUAGES C
)

Expand Down
8 changes: 8 additions & 0 deletions src/detection/displayserver/wmde.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ static void getKDE(FFDisplayServerResult* result)
{
ffStrbufSetS(&result->deProcessName, "plasmashell");
ffStrbufSetS(&result->dePrettyName, "KDE Plasma");

ffParsePropFile(FASTFETCH_TARGET_DIR_USR"/share/xsessions/plasma.desktop", "X-KDE-PluginInfo-Version =", &result->deVersion);
if(result->deVersion.length == 0)
ffParsePropFile(FASTFETCH_TARGET_DIR_USR"/share/xsessions/plasma5.desktop", "X-KDE-PluginInfo-Version =", &result->deVersion);
if(result->deVersion.length == 0)
ffParsePropFile(FASTFETCH_TARGET_DIR_USR"/share/wayland-sessions/plasmawayland.desktop", "X-KDE-PluginInfo-Version =", &result->deVersion);
if(result->deVersion.length == 0)
ffParsePropFile(FASTFETCH_TARGET_DIR_USR"/share/wayland-sessions/plasmawayland5.desktop", "X-KDE-PluginInfo-Version =", &result->deVersion);

applyBetterWM(result, getenv("KDEWM"));
}

Expand Down

0 comments on commit 8c91008

Please sign in to comment.