From 6228e7c143033ec96b0a6d2d7485ea689b73d4fc Mon Sep 17 00:00:00 2001 From: Plaza521 Date: Sat, 21 Oct 2023 22:06:33 +0300 Subject: [PATCH] At least new cat --- .gitignore | 1 + Makefile | 5 ++++- info.c | 2 +- order.c | 35 +++++++++++++++++++++++++++-------- 4 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..88cfc38 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +mycfetch diff --git a/Makefile b/Makefile index 805c2b8..47f46ab 100644 --- a/Makefile +++ b/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 diff --git a/info.c b/info.c index cf8a571..9c929c9 100644 --- a/info.c +++ b/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); diff --git a/order.c b/order.c index 0fd7049..fc928bf 100644 --- a/order.c +++ b/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());