forked from nakidai/mycfetch
1
0
Fork 0

At least new cat

master
Plaza521 2023-10-21 22:06:33 +03:00
parent f23dc457e1
commit 6228e7c143
Signed by untrusted user who does not match committer: nakidai
GPG Key ID: 914675D395210A97
4 changed files with 33 additions and 10 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
mycfetch

View File

@ -1,8 +1,11 @@
CC := gcc CC := gcc
CFLAGS := CFLAGS :=
mycfetch: mycfetch: main.c info.c order.c
$(CC) main.c info.c -o mycfetch $(CFLAGS) $(CC) main.c info.c -o mycfetch $(CFLAGS)
install: mycfetch install: mycfetch
cp mycfetch /usr/bin/mycfetch cp mycfetch /usr/bin/mycfetch
clean:
rm mycfetch

2
info.c
View File

@ -36,7 +36,7 @@ char *GetUptime(void)
char *uptime = malloc(50 * sizeof(char)); char *uptime = malloc(50 * sizeof(char));
for (int i = 0; i < 50; ++i) for (int i = 0; i < 50; ++i)
uptime[i] = 0; uptime[i] = 0;
ptr = popen("/bin/uptime -p", "r"); ptr = popen("uptime -p", "r");
if (ptr == NULL) if (ptr == NULL)
return "idk"; return "idk";
fgets(uptime, 49, ptr); fgets(uptime, 49, ptr);

35
order.c
View File

@ -5,14 +5,33 @@
// Gentoo // Gentoo
// printf(" /‾\\  %s\n", GetCurrentUser()); // printf("\x1B[38;5;135m /‾\\  \x1B[38;5;255m%s\n", GetCurrentUser());
// printf("( o \\\n"); // printf("\x1B[38;5;135m( \x1B[38;5;183mo \x1B[38;5;135m\\\n");
// printf("/ /  %s\n", GetKernelVer()); // printf("\x1B[38;5;135m/ /  \x1B[38;5;255m%s\n", GetKernelVer());
// printf("\\__/  %s\n", GetUptime()); // printf("\x1B[38;5;135m\\__/  \x1B[38;5;255m%s\n", GetUptime());
printf(" /‾\\  %s\n", GetCurrentUser());
printf("( o \\\n");
printf("/ /  %s\n", GetKernelVer());
printf("\\__/  %s\n", GetUptime());
// Arch // Arch
printf(" /\\  %s\n", GetCurrentUser()); // printf(" /\\  %s\n", GetCurrentUser());
printf(" /\\ \\\n"); // printf(" /\\ \\\n");
printf(" / \\  %s\n", GetKernelVer()); // printf(" / \\  %s\n", GetKernelVer());
printf("/__/\\__\\  %s\n", GetUptime()); // printf("/__/\\__\\  %s\n", GetUptime());
// FreeBSD
// printf("\033[31m_ _\033[0m  %s\n", GetCurrentUser());
// printf("\033[31m\\‾‾‾‾/\033[0m\n");
// printf("\033[31m|^ww^|\033[0m  %s\n", GetKernelVer());
// printf("\033[31m\\____/\033[0m  %s\n", GetUptime());
// Just cat
// printf(" |、 %s\n", GetCurrentUser());
// printf("(˚ˎ。7 \n");
// printf(" |、˜〵  %s\n", GetKernelVer());
// printf("じしˍ,)ノ %s\n", GetUptime());