mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-07 21:50:08 +01:00
terminal font
This commit is contained in:
@@ -12,6 +12,8 @@ void ffInitState(FFstate* state)
|
||||
state->passwd = getpwuid(getuid());
|
||||
uname(&state->utsname);
|
||||
sysinfo(&state->sysinfo);
|
||||
state->terminal.value = NULL;
|
||||
state->terminal.error = NULL;
|
||||
}
|
||||
|
||||
void ffDefaultConfig(FFconfig* config)
|
||||
@@ -131,6 +133,20 @@ void ffPrintGtkPretty(const char* gtk2, const char* gtk3, const char* gtk4)
|
||||
}
|
||||
}
|
||||
|
||||
void ffParseFont(char* font, char* buffer)
|
||||
{
|
||||
char name[64];
|
||||
char size[32];
|
||||
int scanned = sscanf(font, "%[^,], %[^,]", name, size);
|
||||
|
||||
if(scanned == 0)
|
||||
strcpy(buffer, font);
|
||||
else if(scanned == 1)
|
||||
strcpy(buffer, name);
|
||||
else
|
||||
sprintf(buffer, "%s (%spt)", name, size);
|
||||
}
|
||||
|
||||
void ffPrintError(FFinstance* instance, const char* key, const char* message)
|
||||
{
|
||||
if(!instance->config.showErrors)
|
||||
|
||||
Reference in New Issue
Block a user