2021-02-18 22:25:36 +01:00
|
|
|
#include "fastfetch.h"
|
|
|
|
|
|
2021-04-09 14:07:05 +02:00
|
|
|
#include <string.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
2021-02-27 18:30:05 +01:00
|
|
|
void ffPrintTitle(FFinstance* instance)
|
2021-02-18 22:25:36 +01:00
|
|
|
{
|
|
|
|
|
char hostname[256];
|
|
|
|
|
gethostname(hostname, 256);
|
|
|
|
|
|
2021-02-27 18:30:05 +01:00
|
|
|
instance->config.titleLength = strlen(instance->state.passwd->pw_name) + 1 + strlen(hostname);
|
2021-02-18 22:25:36 +01:00
|
|
|
|
2021-02-27 18:30:05 +01:00
|
|
|
ffPrintLogoLine(instance);
|
2021-02-18 22:25:36 +01:00
|
|
|
|
2021-02-22 20:36:25 +01:00
|
|
|
printf(FASTFETCH_TEXT_MODIFIER_BOLT"%s%s"FASTFETCH_TEXT_MODIFIER_RESET"@"FASTFETCH_TEXT_MODIFIER_BOLT"%s%s"FASTFETCH_TEXT_MODIFIER_RESET"\n",
|
2021-03-19 20:57:07 +01:00
|
|
|
instance->config.color.chars, instance->state.passwd->pw_name, instance->config.color.chars, hostname
|
2021-02-18 22:25:36 +01:00
|
|
|
);
|
2021-03-27 18:14:19 +01:00
|
|
|
}
|