From f65105d181bcceb13963ce5eba94700951855170 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Thu, 4 Mar 2021 20:49:12 +0100 Subject: [PATCH] battery-format --- src/common.c | 1 + src/fastfetch.c | 35 +++++++++++++++++++++++++++++++++-- src/fastfetch.h | 1 + src/flashfetch.c | 2 -- src/modules/battery.c | 7 +++++++ src/modules/resolution.c | 2 +- src/modules/terminal.c | 2 +- src/util/FFvaluestore.c | 5 +---- 8 files changed, 45 insertions(+), 10 deletions(-) diff --git a/src/common.c b/src/common.c index bedc91e8f..d1da3c56b 100644 --- a/src/common.c +++ b/src/common.c @@ -29,6 +29,7 @@ void ffDefaultConfig(FFconfig* config) config->batteryShowTechnology = true; config->batteryShowCapacity = true; config->batteryShowStatus = true; + config->batteryFormat[0] = '\0'; } void ffPrintKey(FFconfig* config, const char* key) diff --git a/src/fastfetch.c b/src/fastfetch.c index ae4beb3a9..0a6623aa1 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -75,6 +75,7 @@ static void printHelp() " --battery-technology : Show the technology of the battery, if possible\n" " --battery-capacity : Show the capacity of the battery, if possible\n" " --battery-status : Show the status of the battery, if possible\n" + " --battery-formart : Provide the printf format string for battery output (+)\n" "\n" "If an value starts with an ?, it is optional. \"true\" will be used if not set.\n" "An (+) at the end indicates that more help can be printed with --help