Finish rewriting of WM/DE detection

This commit is contained in:
Linus Dierheimer
2022-01-02 19:02:21 +01:00
parent ecb1853d56
commit bd3a5fde07
2 changed files with 5 additions and 2 deletions
-1
View File
@@ -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
+5 -1
View File
@@ -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)