Fastfetch: revert to module color after printing custom colors

This commit is contained in:
李通洲
2024-05-08 15:25:59 +08:00
parent 2880536513
commit 459f159b1b
16 changed files with 67 additions and 47 deletions
+3 -3
View File
@@ -40,7 +40,7 @@ void ffPrintMemory(FFMemoryOptions* options)
if(instance.config.display.percentType & FF_PERCENTAGE_TYPE_BAR_BIT)
{
ffPercentAppendBar(&str, percentage, options->percent);
ffPercentAppendBar(&str, percentage, options->percent, &options->moduleArgs);
ffStrbufAppendC(&str, ' ');
}
@@ -48,7 +48,7 @@ void ffPrintMemory(FFMemoryOptions* options)
ffStrbufAppendF(&str, "%s / %s ", usedPretty.chars, totalPretty.chars);
if(instance.config.display.percentType & FF_PERCENTAGE_TYPE_NUM_BIT)
ffPercentAppendNum(&str, percentage, options->percent, str.length > 0);
ffPercentAppendNum(&str, percentage, options->percent, str.length > 0, &options->moduleArgs);
ffStrbufTrimRight(&str, ' ');
ffStrbufPutTo(&str, stdout);
@@ -57,7 +57,7 @@ void ffPrintMemory(FFMemoryOptions* options)
else
{
FF_STRBUF_AUTO_DESTROY percentageStr = ffStrbufCreate();
ffPercentAppendNum(&percentageStr, percentage, options->percent, false);
ffPercentAppendNum(&percentageStr, percentage, options->percent, false, &options->moduleArgs);
FF_PRINT_FORMAT_CHECKED(FF_MEMORY_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, FF_MEMORY_NUM_FORMAT_ARGS, ((FFformatarg[]){
{FF_FORMAT_ARG_TYPE_STRBUF, &usedPretty},
{FF_FORMAT_ARG_TYPE_STRBUF, &totalPretty},