mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Merge pull request #70 from DarNCelsius/master
Sanitize custom Plasma theme name
This commit is contained in:
@@ -45,6 +45,17 @@ static void printWMThemeFromConfigFile(FFinstance* instance, const char* configF
|
||||
return;
|
||||
}
|
||||
|
||||
// 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