mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:24:58 +02:00
Merge pull request #43 from DarNCelsius/master
Renamed all instances of 'seperator'
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ __fastfetch_completion()
|
||||
"--color"
|
||||
"--spacing"
|
||||
"-s"
|
||||
"--seperator"
|
||||
"--separator"
|
||||
"-x"
|
||||
"--offsetx"
|
||||
"--structure"
|
||||
|
||||
+1
-1
@@ -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}{?}"
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -8,7 +8,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#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 <key=value>: hard set the value of a key\n"
|
||||
" -c <color>, --color <color>: sets the color of the keys. Must be a linux console color code (+)\n"
|
||||
" --spacing <width>: sets the distance between logo and text\n"
|
||||
" -s <str>, --seperator <str>: sets the separator between key and value. Default is a colon with a space\n"
|
||||
" -s <str>, --separator <str>: sets the separator 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"
|
||||
" -r <?value> --recache <?value>: 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 <key=value>, '=' 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)
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ int main(int argc, char** argv)
|
||||
|
||||
//Printing
|
||||
ffPrintTitle(&instance);
|
||||
ffPrintSeperator(&instance);
|
||||
ffPrintSeparator(&instance);
|
||||
ffPrintOS(&instance);
|
||||
ffPrintHost(&instance);
|
||||
ffPrintKernel(&instance);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "fastfetch.h"
|
||||
|
||||
void ffPrintSeperator(FFinstance* instance)
|
||||
void ffPrintSeparator(FFinstance* instance)
|
||||
{
|
||||
ffPrintLogoLine(instance);
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user