From f0342ef54e80bcae7644f1d86cdad6f17a7fb74a Mon Sep 17 00:00:00 2001 From: Guaxinim5573 Date: Thu, 22 Jul 2021 20:33:04 -0300 Subject: [PATCH] Add arch based distros --- "res/ascii/\"manjaro-arm\".txt" | 8 ++++++++ res/ascii/artix.txt | 8 ++++++++ res/ascii/endeavouros.txt | 7 +++++++ res/ascii/manjaro.txt | 8 ++++++++ uwufetch.c | 8 +++++--- 5 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 "res/ascii/\"manjaro-arm\".txt" create mode 100644 res/ascii/artix.txt create mode 100644 res/ascii/endeavouros.txt create mode 100644 res/ascii/manjaro.txt diff --git "a/res/ascii/\"manjaro-arm\".txt" "b/res/ascii/\"manjaro-arm\".txt" new file mode 100644 index 0000000..a6c34cf --- /dev/null +++ "b/res/ascii/\"manjaro-arm\".txt" @@ -0,0 +1,8 @@ + △ △ ◠◠◠◠ + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL}{BACKGROUND_GREEN}{BLACK} > ω < {NORMAL}{BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} diff --git a/res/ascii/artix.txt b/res/ascii/artix.txt new file mode 100644 index 0000000..b363ab3 --- /dev/null +++ b/res/ascii/artix.txt @@ -0,0 +1,8 @@ +{BLUE} /\ + / \ + /`'.,\ + /• w • \ + / ,`\ + / ,.'`. \ + /.,'` `'.\ + \ No newline at end of file diff --git a/res/ascii/endeavouros.txt b/res/ascii/endeavouros.txt new file mode 100644 index 0000000..003c84f --- /dev/null +++ b/res/ascii/endeavouros.txt @@ -0,0 +1,7 @@ +{MAGENTA} /\ + {RED}/{MAGENTA}/ \{BLUE}\ + {RED}/{MAGENTA}/>ω<\{BLUE}\ + {RED}/{MAGENTA}/ \ {BLUE}\ + {RED}/ {MAGENTA}/ _) {BLUE}) + {RED}/_{MAGENTA}/___-- {BLUE}___- + /____--- diff --git a/res/ascii/manjaro.txt b/res/ascii/manjaro.txt new file mode 100644 index 0000000..a6c34cf --- /dev/null +++ b/res/ascii/manjaro.txt @@ -0,0 +1,8 @@ + △ △ ◠◠◠◠ + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL}{BACKGROUND_GREEN}{BLACK} > ω < {NORMAL}{BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} + {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} {BACKGROUND_GREEN} {NORMAL} diff --git a/uwufetch.c b/uwufetch.c index 80154ec..e7797f5 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -631,7 +631,7 @@ replace("Hello World!", "World", "everyone") This returns "Hello everyone!". */ void replace(char *original, char *search, char *replacer) { - char buffer[4096]; + char buffer[1024]; char *ch; if(!(ch = strstr(original, search))) return; @@ -670,8 +670,8 @@ void print_ascii() return print_ascii(); } } - char line[64]; - while(fgets(line, 64, file)) { + char line[256]; + while(fgets(line, 256, file)) { replace(line, "{NORMAL}", NORMAL); replace(line, "{BOLD}", BOLD); replace(line, "{BLACK}", BLACK); @@ -684,6 +684,8 @@ void print_ascii() replace(line, "{WHITE}", WHITE); replace(line, "{PINK}", PINK); replace(line, "{LPINK}", LPINK); + // For manjaro + replace(line, "{BACKGROUND_GREEN}", "\e[0;42m"); printf(line); } // Always set color to NORMAL, so there's no need to do this in every ascii file.