mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
OS (Linux): detects Ubuntu Studio before Kubuntu on KDE systems (#2298)
* fix(os): detect Ubuntu Studio before KDE-based flavor checks Add an explicit Ubuntu Studio detection in `getUbuntuFlavour()` by checking for `/usr/share/doc/ubuntustudio-desktop` and setting `name`, `id`, and `idLike` accordingly. This prevents Ubuntu Studio systems from being misidentified as Kubuntu when KDE/Plasma-related XDG config paths are present.fix(os): detect Ubuntu Studio before KDE-based flavor checks Add an explicit Ubuntu Studio detection in `getUbuntuFlavour()` by checking for `/usr/share/doc/ubuntustudio-desktop` and setting `name`, `id`, and `idLike` accordingly. This prevents Ubuntu Studio systems from being misidentified as Kubuntu when KDE/Plasma-related XDG config paths are present. * refactor(os): detect Ubuntu Studio via package presence
This commit is contained in:
@@ -99,6 +99,14 @@ FF_A_UNUSED static bool getUbuntuFlavour(FFOSResult* result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ffPathExists("/var/lib/dpkg/info/ubuntustudio-desktop.list", FF_PATHTYPE_FILE))
|
||||
{
|
||||
ffStrbufSetStatic(&result->name, "Ubuntu Studio");
|
||||
ffStrbufSetStatic(&result->id, "ubuntu-studio");
|
||||
ffStrbufSetStatic(&result->idLike, "ubuntu");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ffStrContains(xdgConfigDirs, "kde") || ffStrContains(xdgConfigDirs, "plasma") || ffStrContains(xdgConfigDirs, "kubuntu")) {
|
||||
ffStrbufSetStatic(&result->name, "Kubuntu");
|
||||
ffStrbufSetStatic(&result->id, "kubuntu");
|
||||
|
||||
Reference in New Issue
Block a user