mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
renamed spacer to spacing
This commit is contained in:
parent
101d19a015
commit
c783bb9d97
@ -116,7 +116,7 @@ __fastfetch_completion()
|
||||
local FF_OPTIONS_STRING=(
|
||||
"-c"
|
||||
"--color"
|
||||
"--spacer"
|
||||
"--spacing"
|
||||
"-s"
|
||||
"--seperator"
|
||||
"-x"
|
||||
|
@ -22,7 +22,7 @@ void ffInitState(FFstate* state)
|
||||
void ffDefaultConfig(FFconfig* config)
|
||||
{
|
||||
ffStrbufInit(&config->color);
|
||||
config->logo_spacer = 4;
|
||||
config->logo_spacing = 4;
|
||||
ffStrbufInitS(&config->seperator, ": ");
|
||||
config->offsetx = 0;
|
||||
config->titleLength = 20; // This is overwritten by ffPrintTitle
|
||||
|
@ -45,7 +45,7 @@ static inline void printHelp()
|
||||
" --structure <structure>: sets the structure of the fetch. Must be a colon seperated list of keys\n"
|
||||
" --set <key=value>: hard set the value of an key\n"
|
||||
" -c <color>, --color <color>: sets the color of the keys. Must be a linux console color code (+)\n"
|
||||
" --spacer <width>: sets the distance between logo and text\n"
|
||||
" --spacing <width>: sets the distance between logo and text\n"
|
||||
" -s <str>, --seperator <str>: sets the seperator between key and value. Default is a colon with a space\n"
|
||||
" -x <offset>, --offsetx <offset>: sets the x offset. Can be negative to cut the logo, but no more than logo width.\n"
|
||||
" --show-errors <?value>: print occuring errors\n"
|
||||
@ -247,14 +247,14 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
puts(FASTFETCH_DEFAULT_CONFIG);
|
||||
exit(0);
|
||||
}
|
||||
else if(strcasecmp(key, "--spacer") == 0)
|
||||
else if(strcasecmp(key, "--spacing") == 0)
|
||||
{
|
||||
if(value == NULL)
|
||||
{
|
||||
printf("Error: usage: %s <width>\n", key);
|
||||
exit(404);
|
||||
}
|
||||
if(sscanf(value, "%hd", &instance->config.logo_spacer) != 1)
|
||||
if(sscanf(value, "%hd", &instance->config.logo_spacing) != 1)
|
||||
{
|
||||
printf("Error: couldn't parse %s to uint16_t\n", value);
|
||||
exit(405);
|
||||
|
@ -34,7 +34,7 @@ typedef struct FFlogo
|
||||
typedef struct FFconfig
|
||||
{
|
||||
FFlogo logo;
|
||||
uint16_t logo_spacer;
|
||||
uint16_t logo_spacing;
|
||||
FFstrbuf seperator;
|
||||
int16_t offsetx;
|
||||
FFstrbuf color;
|
||||
|
@ -164,7 +164,7 @@ void ffLoadLogoSet(FFconfig* config, const char* logo)
|
||||
if(strcasecmp(logo, "none") == 0)
|
||||
{
|
||||
loadNoneLogo(&config->logo);
|
||||
config->logo_spacer = 0; //This is wanted in most cases, so just set it
|
||||
config->logo_spacing = 0; //This is wanted in most cases, so just set it
|
||||
}
|
||||
else if(strcasecmp(logo, "arch") == 0)
|
||||
{
|
||||
@ -224,7 +224,7 @@ void ffPrintLogoLine(FFinstance* instance)
|
||||
putchar(' ');
|
||||
}
|
||||
|
||||
for(uint16_t i = 0; i < instance->config.logo_spacer; i++)
|
||||
for(uint16_t i = 0; i < instance->config.logo_spacing; i++)
|
||||
putchar(' ');
|
||||
|
||||
++instance->state.current_row;
|
||||
|
Loading…
x
Reference in New Issue
Block a user