fix
This commit is contained in:
parent
208725ee0d
commit
135a196f9a
6 changed files with 16 additions and 86 deletions
|
@ -1,7 +1,9 @@
|
|||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/utsname.h>
|
||||
#include "fetch.h"
|
||||
#include "config.h"
|
||||
|
@ -74,3 +76,10 @@ void Blank(const char *title, const FETCH fetch) {
|
|||
|
||||
printf("");
|
||||
}
|
||||
|
||||
void GetUser(const char *title, const FETCH fetch) {
|
||||
UNUSED(fetch);
|
||||
|
||||
struct passwd *pw = getpwuid(geteuid());
|
||||
printf("%s%s%s%s", fetch.color, title, fetch.font_color, (pw != 0) ? pw->pw_name : "none");
|
||||
}
|
||||
|
|
|
@ -13,12 +13,12 @@ int main(void) {
|
|||
printf("%s", fetch.logo[fetch.logo_size - 1]);
|
||||
|
||||
CONFIG[i].func(CONFIG[i].title, fetch);
|
||||
putchar('\n');
|
||||
printf("\033[0m\n");
|
||||
}
|
||||
|
||||
for (; i < fetch.logo_size; i++)
|
||||
printf("%s\n", fetch.logo[i]);
|
||||
|
||||
printf("\n\033[0m");
|
||||
printf("\033[0m\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue