mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
Global: add support for colored percentage numbers output
This commit is contained in:
@@ -56,7 +56,7 @@ static void printMemory(FFinstance* instance, const char* name, const FFModuleAr
|
||||
ffStrbufAppendF(&str, "%s / %s ", usedPretty.chars, totalPretty.chars);
|
||||
|
||||
if(instance->config.percentType & FF_PERCENTAGE_TYPE_NUM_BIT)
|
||||
ffStrbufAppendF(&str, str.length > 0 ? "(%u%%)" : "%u%%", percentage);
|
||||
ffAppendPercentNum(instance, &str, (uint8_t) percentage, 50, 80, str.length > 0);
|
||||
|
||||
ffStrbufTrimRight(&str, ' ');
|
||||
ffStrbufPutTo(&str, stdout);
|
||||
|
||||
Reference in New Issue
Block a user