Merge pull request #70 from DarNCelsius/master

Sanitize custom Plasma theme name
This commit is contained in:
Linus Dierheimer
2021-06-26 16:54:49 +02:00
committed by GitHub
+11
View File
@@ -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);
}