From ca08e07c372517de2fe60cee9e6a97092c9d1295 Mon Sep 17 00:00:00 2001 From: DarN Date: Sat, 15 May 2021 12:36:25 +0200 Subject: [PATCH] Renamed all instances of 'seperator' --- CMakeLists.txt | 2 +- completions/bash | 2 +- presets/neofetch | 2 +- presets/paleofetch | 2 +- src/common/init.c | 2 +- src/common/io.c | 2 +- src/fastfetch.c | 22 +++++++++++----------- src/fastfetch.h | 4 ++-- src/flashfetch.c | 2 +- src/modules/{seperator.c => separator.c} | 2 +- tests/performance.c | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) rename src/modules/{seperator.c => separator.c} (78%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4004949d1..ea93e8f0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,7 +92,7 @@ set(SRCS src/modules/break.c src/modules/custom.c src/modules/title.c - src/modules/seperator.c + src/modules/separator.c src/modules/os.c src/modules/host.c src/modules/kernel.c diff --git a/completions/bash b/completions/bash index 6848c005f..0f3a9369c 100644 --- a/completions/bash +++ b/completions/bash @@ -126,7 +126,7 @@ __fastfetch_completion() "--color" "--spacing" "-s" - "--seperator" + "--separator" "-x" "--offsetx" "--structure" diff --git a/presets/neofetch b/presets/neofetch index 47da5922e..514292bc1 100644 --- a/presets/neofetch +++ b/presets/neofetch @@ -1,4 +1,4 @@ ---structure "Title:Seperator:OS:Host:Kernel:Uptime:Packages:Shell:Resolution:DE:WM:WMTheme:Theme:Icons:Terminal:TerminalFont:CPU:GPU:Memory:Break:Colors" +--structure "Title:Separator:OS:Host:Kernel:Uptime:Packages:Shell:Resolution:DE:WM:WMTheme:Theme:Icons:Terminal:TerminalFont:CPU:GPU:Memory:Break:Colors" --host-format "{/2}{-}{/}{2}{?3} {3}{?}" --de-format "{/1}{-}{/}{1}{?2} {2}{?}" --terminal-font-format "{/2}{-}{/}{2}{?3} {3}{?}" diff --git a/presets/paleofetch b/presets/paleofetch index 3b47c0881..fbaa17848 100644 --- a/presets/paleofetch +++ b/presets/paleofetch @@ -1,4 +1,4 @@ ---structure Title:Seperator:OS:Host:Kernel:Uptime:Battery:Break:Packages:Shell:Resolution:Terminal:Break:CPU:GPU:Memory:Break:Colors +--structure Title:Separator:OS:Host:Kernel:Uptime:Battery:Break:Packages:Shell:Resolution:Terminal:Break:CPU:GPU:Memory:Break:Colors --host-format "{/2}{-}{/}{2}{?3} {3}{?}" --battery-format "{/4}{-}{/}{4}%{?5} [{5}]{?}" --resolution-key "Resolution" diff --git a/src/common/init.c b/src/common/init.c index 9d056c3d9..e4c512abe 100644 --- a/src/common/init.c +++ b/src/common/init.c @@ -100,7 +100,7 @@ static void defaultConfig(FFconfig* config) { ffStrbufInit(&config->color); config->logo_spacing = 4; - ffStrbufInitS(&config->seperator, ": "); + ffStrbufInitS(&config->separator, ": "); config->offsetx = 0; config->titleLength = 20; // This is overwritten by ffPrintTitle config->colorLogo = true; diff --git a/src/common/io.c b/src/common/io.c index f5cbff45e..f8c7f2909 100644 --- a/src/common/io.c +++ b/src/common/io.c @@ -33,7 +33,7 @@ void ffPrintLogoAndKey(FFinstance* instance, const char* moduleName, uint8_t mod ffStrbufWriteTo(&key, stdout); fputs(FASTFETCH_TEXT_MODIFIER_RESET, stdout); - ffStrbufWriteTo(&instance->config.seperator, stdout); + ffStrbufWriteTo(&instance->config.separator, stdout); ffStrbufDestroy(&key); } diff --git a/src/fastfetch.c b/src/fastfetch.c index 3f6c099be..7eccb3e59 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -8,7 +8,7 @@ #include #include -#define FASTFETCH_DEFAULT_STRUCTURE "Title:Seperator:OS:Host:Kernel:Uptime:Packages:Shell:Resolution:DE:WM:WMTheme:Theme:Icons:Font:Terminal:TerminalFont:CPU:GPU:Memory:Disk:Battery:Locale:Break:Colors" +#define FASTFETCH_DEFAULT_STRUCTURE "Title:Separator:OS:Host:Kernel:Uptime:Packages:Shell:Resolution:DE:WM:WMTheme:Theme:Icons:Font:Terminal:TerminalFont:CPU:GPU:Memory:Disk:Battery:Locale:Break:Colors" #define FASTFETCH_DEFAULT_CONFIG \ "# Fastfetch configuration\n" \ @@ -50,7 +50,7 @@ static inline void printHelp() " --set : hard set the value of a key\n" " -c , --color : sets the color of the keys. Must be a linux console color code (+)\n" " --spacing : sets the distance between logo and text\n" - " -s , --seperator : sets the separator between key and value. Default is a colon with a space\n" + " -s , --separator : sets the separator between key and value. Default is a colon with a space\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" " -r --recache : generate new cached values\n" @@ -472,7 +472,7 @@ static inline void printAvailableModules() "OS\n" "Packages\n" "Resolution\n" - "Seperator\n" + "Separator\n" "Shell\n" "Terminal\n" "TerminalFont\n" @@ -746,17 +746,17 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con exit(411); } - char* seperator = strchr(value, '='); + char* separator = strchr(value, '='); - if(seperator == NULL) + if(separator == NULL) { fprintf(stderr, "Error: usage: %s , '=' missing\n", key); exit(412); } - *seperator = '\0'; + *separator = '\0'; - ffValuestoreSet(&data->valuestore, value, seperator + 1); + ffValuestoreSet(&data->valuestore, value, separator + 1); } else if(strcasecmp(key, "-r") == 0 || strcasecmp(key, "--recache") == 0) { @@ -785,8 +785,8 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con optionParseString(key, value, &data->structure); else if(strcasecmp(key, "-l") == 0 || strcasecmp(key, "--logo") == 0) optionParseString(key, value, &data->logoName); - else if(strcasecmp(key, "-s") == 0 || strcasecmp(key, "--seperator") == 0) - optionParseString(key, value, &instance->config.seperator); + else if(strcasecmp(key, "-s") == 0 || strcasecmp(key, "--separator") == 0) + optionParseString(key, value, &instance->config.separator); else if(strcasecmp(key, "-c") == 0 || strcasecmp(key, "--color") == 0) optionParseString(key, value, &instance->config.color); else if(strcasecmp(key, "--os-format") == 0) @@ -974,8 +974,8 @@ static void parseStructureCommand(FFinstance* instance, FFdata* data, const char ffPrintBreak(instance); else if(strcasecmp(line, "title") == 0) ffPrintTitle(instance); - else if(strcasecmp(line, "seperator") == 0) - ffPrintSeperator(instance); + else if(strcasecmp(line, "separator") == 0) + ffPrintSeparator(instance); else if(strcasecmp(line, "os") == 0) ffPrintOS(instance); else if(strcasecmp(line, "host") == 0) diff --git a/src/fastfetch.h b/src/fastfetch.h index ff09831d8..432f3f7f2 100644 --- a/src/fastfetch.h +++ b/src/fastfetch.h @@ -37,7 +37,7 @@ typedef struct FFconfig { FFlogo logo; uint16_t logo_spacing; - FFstrbuf seperator; + FFstrbuf separator; int16_t offsetx; FFstrbuf color; uint32_t titleLength; @@ -303,7 +303,7 @@ const FFTerminalResult* ffDetectTerminal(FFinstance* instance); void ffPrintCustom(FFinstance* instance, const char* key, const char* value); void ffPrintBreak(FFinstance* instance); void ffPrintTitle(FFinstance* instance); -void ffPrintSeperator(FFinstance* instance); +void ffPrintSeparator(FFinstance* instance); void ffPrintOS(FFinstance* instance); void ffPrintHost(FFinstance* instance); void ffPrintKernel(FFinstance* instance); diff --git a/src/flashfetch.c b/src/flashfetch.c index ecf36e42d..ba246da1d 100644 --- a/src/flashfetch.c +++ b/src/flashfetch.c @@ -18,7 +18,7 @@ int main(int argc, char** argv) //Printing ffPrintTitle(&instance); - ffPrintSeperator(&instance); + ffPrintSeparator(&instance); ffPrintOS(&instance); ffPrintHost(&instance); ffPrintKernel(&instance); diff --git a/src/modules/seperator.c b/src/modules/separator.c similarity index 78% rename from src/modules/seperator.c rename to src/modules/separator.c index 75e77e43d..683718b61 100644 --- a/src/modules/seperator.c +++ b/src/modules/separator.c @@ -1,6 +1,6 @@ #include "fastfetch.h" -void ffPrintSeperator(FFinstance* instance) +void ffPrintSeparator(FFinstance* instance) { ffPrintLogoLine(instance); diff --git a/tests/performance.c b/tests/performance.c index 822a08963..760bf9927 100644 --- a/tests/performance.c +++ b/tests/performance.c @@ -41,7 +41,7 @@ int main(int argc, char** argv) ) FASTFETCH_TEST_PERFORMANCE(ffPrintTitle(&instance)) - FASTFETCH_TEST_PERFORMANCE(ffPrintSeperator(&instance)) + FASTFETCH_TEST_PERFORMANCE(ffPrintSeparator(&instance)) FASTFETCH_TEST_PERFORMANCE(ffPrintOS(&instance)) FASTFETCH_TEST_PERFORMANCE(ffPrintHost(&instance)) FASTFETCH_TEST_PERFORMANCE(ffPrintKernel(&instance))