From bd3a5fde07c20c8f44c4cd2f9552208dcdd9d8f7 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Sun, 2 Jan 2022 19:02:21 +0100 Subject: [PATCH] Finish rewriting of WM/DE detection --- DEVELOPMENT.md | 1 - src/detection/displayserver/wmde.c | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 0285a9dd5..15b561f12 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -8,7 +8,6 @@ Here i just add things that are easy to forget. - [ ] Support for printing images as ascii art logos (using imlib2 and libcaca probably) - [ ] Support for printing images in terminals that support it - [ ] Better documentation (especially default config file and the various --help options. Colored output?) -- [ ] Unifing resolution and WM/DE code. For example when having a x server connection, it can be used to detect WM with XProperties too. - [ ] Better OS output for all possible combinations of /etc/os-release variables. - [ ] Fallback OS detection with lsb - [ ] Android support diff --git a/src/detection/displayserver/wmde.c b/src/detection/displayserver/wmde.c index 0354d6c08..036caba57 100644 --- a/src/detection/displayserver/wmde.c +++ b/src/detection/displayserver/wmde.c @@ -60,12 +60,16 @@ static void applyPrettyNameIfWM(FFDisplayServerResult* result, const char* proce ffStrbufSetS(&result->wmPrettyName, "Xfwm4"); else if(strcasecmp(processName, "Marco") == 0) ffStrbufSetS(&result->wmPrettyName, "Marco"); + else if(strcasecmp(processName, "xmonad") == 0) + ffStrbufSetS(&result->wmPrettyName, "XMonad"); else if(strcasecmp(processName, "gnome-session-binary") == 0 || strcasecmp(processName, "Mutter") == 0) ffStrbufSetS(&result->wmPrettyName, "Mutter"); else if(strcasecmp(processName, "cinnamon-session") == 0 || strcasecmp(processName, "Muffin") == 0) ffStrbufSetS(&result->wmPrettyName, "Muffin"); else if( // WMs where the pretty name matches the process name - strcasecmp(processName, "dwm") == 0 + strcasecmp(processName, "dwm") == 0 || + strcasecmp(processName, "bspwm") == 0 || + strcasecmp(processName, "tinywm") == 0 ) ffStrbufSetS(&result->wmPrettyName, processName); if(result->wmPrettyName.length > 0 && result->wmProcessName.length == 0)