forked from nakidai/mycfetch
At least new cat
parent
f23dc457e1
commit
6228e7c143
|
@ -0,0 +1 @@
|
|||
mycfetch
|
5
Makefile
5
Makefile
|
@ -1,8 +1,11 @@
|
|||
CC := gcc
|
||||
CFLAGS :=
|
||||
|
||||
mycfetch:
|
||||
mycfetch: main.c info.c order.c
|
||||
$(CC) main.c info.c -o mycfetch $(CFLAGS)
|
||||
|
||||
install: mycfetch
|
||||
cp mycfetch /usr/bin/mycfetch
|
||||
|
||||
clean:
|
||||
rm mycfetch
|
||||
|
|
2
info.c
2
info.c
|
@ -36,7 +36,7 @@ char *GetUptime(void)
|
|||
char *uptime = malloc(50 * sizeof(char));
|
||||
for (int i = 0; i < 50; ++i)
|
||||
uptime[i] = 0;
|
||||
ptr = popen("/bin/uptime -p", "r");
|
||||
ptr = popen("uptime -p", "r");
|
||||
if (ptr == NULL)
|
||||
return "idk";
|
||||
fgets(uptime, 49, ptr);
|
||||
|
|
35
order.c
35
order.c
|
@ -5,14 +5,33 @@
|
|||
|
||||
// Gentoo
|
||||
|
||||
// printf(" /‾\\ %s\n", GetCurrentUser());
|
||||
// printf("( o \\\n");
|
||||
// printf("/ / %s\n", GetKernelVer());
|
||||
// printf("\\__/ %s\n", GetUptime());
|
||||
// printf("\x1B[38;5;135m /‾\\ \x1B[38;5;255m%s\n", GetCurrentUser());
|
||||
// printf("\x1B[38;5;135m( \x1B[38;5;183mo \x1B[38;5;135m\\\n");
|
||||
// printf("\x1B[38;5;135m/ / \x1B[38;5;255m%s\n", GetKernelVer());
|
||||
// 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
|
||||
|
||||
printf(" /\\ %s\n", GetCurrentUser());
|
||||
printf(" /\\ \\\n");
|
||||
printf(" / \\ %s\n", GetKernelVer());
|
||||
printf("/__/\\__\\ %s\n", GetUptime());
|
||||
// printf(" /\\ %s\n", GetCurrentUser());
|
||||
// printf(" /\\ \\\n");
|
||||
// printf(" / \\ %s\n", GetKernelVer());
|
||||
// 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());
|
||||
|
|
Loading…
Reference in New Issue