mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Added flexible remove logic
This commit is contained in:
+10
-2
@@ -45,8 +45,16 @@ static void printWMThemeFromConfigFile(FFinstance* instance, const char* configF
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove Plasma-generated prefix
|
||||
ffStrbufRemoveStrings(&theme, 1, "__aurorae__svg__");
|
||||
// Remove Plasma-generated prefixes
|
||||
uint32_t idx = 0;
|
||||
|
||||
idx = ffStrbufFirstIndexS(&theme, "qml_");
|
||||
if((idx != theme.length))
|
||||
ffStrbufSubstrAfter(&theme, idx + 3);
|
||||
|
||||
idx = ffStrbufFirstIndexS(&theme, "svg__");
|
||||
if((idx != theme.length))
|
||||
ffStrbufSubstrAfter(&theme, idx + 4);
|
||||
|
||||
printWMTheme(instance, theme.chars);
|
||||
ffStrbufDestroy(&theme);
|
||||
|
||||
Reference in New Issue
Block a user