diff --git a/src/detection/de/de_linux.c b/src/detection/de/de_linux.c index a1bb98480..7237c53c0 100644 --- a/src/detection/de/de_linux.c +++ b/src/detection/de/de_linux.c @@ -10,18 +10,22 @@ #include "util/stringUtils.h" #include +#ifdef __FreeBSD__ + #include +#endif static void getKDE(FFstrbuf* result, FFDEOptions* options) { - ffParsePropFileValues(FASTFETCH_TARGET_DIR_USR "/share/wayland-sessions/plasma.desktop", 1, (FFpropquery[]) { - {"X-KDE-PluginInfo-Version =", result} - }); +#ifdef __FreeBSD__ + ffParsePropFile(_PATH_LOCALBASE "/share/wayland-sessions/plasma.desktop", "X-KDE-PluginInfo-Version =", result); if(result->length == 0) - { - ffParsePropFileValues(FASTFETCH_TARGET_DIR_USR "/share/xsessions/plasmax11.desktop", 1, (FFpropquery[]) { - {"X-KDE-PluginInfo-Version =", result} - }); - } + ffParsePropFile(_PATH_LOCALBASE "/share/xsessions/plasmax11.desktop", "X-KDE-PluginInfo-Version =", result); +#else + ffParsePropFile(FASTFETCH_TARGET_DIR_USR "/share/wayland-sessions/plasma.desktop", "X-KDE-PluginInfo-Version =", result); + if(result->length == 0) + ffParsePropFile(FASTFETCH_TARGET_DIR_USR "/share/xsessions/plasmax11.desktop", "X-KDE-PluginInfo-Version =", result); +#endif + if(result->length == 0) ffParsePropFileData("xsessions/plasma.desktop", "X-KDE-PluginInfo-Version =", result); if(result->length == 0)