diff --git a/src/common.c b/src/common.c index 250475b97..bedc91e8f 100644 --- a/src/common.c +++ b/src/common.c @@ -14,6 +14,23 @@ void ffInitState(FFstate* state) sysinfo(&state->sysinfo); } +void ffDefaultConfig(FFconfig* config) +{ + config->color[0] = '\0'; + config->logo_seperator = 4; + config->offsetx = 0; + config->titleLength = 20; // This is overwritten by ffPrintTitle + config->colorLogo = true; + config->showErrors = false; + config->recache = false; + + config->batteryShowManufacturer = true; + config->batteryShowModel = true; + config->batteryShowTechnology = true; + config->batteryShowCapacity = true; + config->batteryShowStatus = true; +} + void ffPrintKey(FFconfig* config, const char* key) { printf(FASTFETCH_TEXT_MODIFIER_BOLT"%s%s"FASTFETCH_TEXT_MODIFIER_RESET": ", config->color, key); diff --git a/src/fastfetch.c b/src/fastfetch.c index ef7e068a8..d085a2b8a 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -29,25 +29,38 @@ typedef struct FFdata static void printHelp() { puts( - "usage: fastfetch \n" + "Usage: fastfetch \n" "\n" - " -h, --help: shows this message and exits\n" - " -h , --help : shows help for a specific command and exits\n" - " -v --version: prints the version of fastfetch and exits\n" - " --list-logos: list available logos and exits\n" - " --print-logos: shows available logos and exits\n" - " --print-default-config: prints the default config and exits\n" + "Informative options:\n" + " -h, --help: shows this message and exits\n" + " -h , --help : shows help for a specific command and exits\n" + " -v --version: prints the version of fastfetch and exits\n" + " --list-logos: list available logos and exits\n" + " --print-logos: shows available logos and exits\n" + " --print-default-config: prints the default config and exits\n" + "\n" + "General options:\n" " --structure : sets the structure of the fetch. Must be a colon seperated list of keys\n" " --set : hard set the value of an key\n" - " -l , --logo : sets the shown logo. Also changes the main color accordingly\n" - " -c , --color : sets the color of the keys. Must be a linux console color code\n" + " -c , --color : sets the color of the keys. Must be a linux console color code (+)\n" " -s , --seperator : sets the distance between logo and text\n" " -x , --offsetx : sets the x offset. Can be negative to cut the logo, but no more than logo width.\n" " --show-errors : print occuring errors\n" - " --color-logo : if set to false, the logo will be black / white\n" " -r --recache : if set to true, no cached values will be used\n" "\n" + "Logo options:\n" + " -l , --logo : sets the shown logo. Also changes the main color accordingly\n" + " --color-logo : if set to false, the logo will be black / white\n" + "\n" + "Battery options:\n" + " --battery-manufacturer : Show the manufacturer of the battery, if possible\n" + " --battery-model : Show the model of the battery, if possible\n" + " --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" + "\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