mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
dont print line if format evaluates to an empty string
This commit is contained in:
+3
-8
@@ -23,10 +23,10 @@ void ffPrintTheme(FFinstance* instance)
|
||||
FF_STRBUF_CREATE(gtkPretty);
|
||||
ffFormatGtkPretty(>kPretty, gtk2, gtk3, gtk4);
|
||||
|
||||
ffPrintLogoAndKey(instance, "Theme");
|
||||
|
||||
if(instance->config.themeFormat.length == 0)
|
||||
{
|
||||
ffPrintLogoAndKey(instance, "Theme");
|
||||
|
||||
if(plasma[0] != '\0')
|
||||
printf("%s [Plasma], ", plasma);
|
||||
|
||||
@@ -34,17 +34,12 @@ void ffPrintTheme(FFinstance* instance)
|
||||
}
|
||||
else
|
||||
{
|
||||
FF_STRBUF_CREATE(theme);
|
||||
|
||||
ffParseFormatString(&theme, &instance->config.themeFormat, 5,
|
||||
ffPrintFormatString(instance, "Theme", &instance->config.themeFormat, 5,
|
||||
(FFformatarg){FF_FORMAT_ARG_TYPE_STRING, plasma},
|
||||
(FFformatarg){FF_FORMAT_ARG_TYPE_STRING, gtk2},
|
||||
(FFformatarg){FF_FORMAT_ARG_TYPE_STRING, gtk3},
|
||||
(FFformatarg){FF_FORMAT_ARG_TYPE_STRING, gtk4},
|
||||
(FFformatarg){FF_FORMAT_ARG_TYPE_STRBUF, >kPretty}
|
||||
);
|
||||
|
||||
ffStrbufPutTo(&theme, stdout);
|
||||
ffStrbufDestroy(&theme);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user