Little changes to android ascii logo, check if viu is installed, added new function to 'uwufie the name'.
This commit is contained in:
parent
6d6e0406d8
commit
358f6b17dd
2 changed files with 52 additions and 47 deletions
|
@ -3,6 +3,11 @@
|
||||||
Int this directory, all the images for the logos, are stored.
|
Int this directory, all the images for the logos, are stored.
|
||||||
If you want to remove *your* image from this repository contact me on [reddit](https://www.reddit.com/user/TheDarkBug).
|
If you want to remove *your* image from this repository contact me on [reddit](https://www.reddit.com/user/TheDarkBug).
|
||||||
|
|
||||||
|
## How to use images
|
||||||
|
|
||||||
|
First at all you need `viu`, to install it follow the [guide](https://github.com/atanunq/viu#installation).
|
||||||
|
Images are working in almost every terminal, for a better experience i recommend [kitty](https://github.com/kovidgoyal/kitty)
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
<img src="https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/arch.png" title="" alt="image" width="200"> Nyarch Linuwu by u/Ishaan_P ([here](https://www.reddit.com/r/linuxmasterrace/comments/lxfg9j/someone_posted_uwuntu_so_i_made_nyarch/))
|
<img src="https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/arch.png" title="" alt="image" width="200"> Nyarch Linuwu by u/Ishaan_P ([here](https://www.reddit.com/r/linuxmasterrace/comments/lxfg9j/someone_posted_uwuntu_so_i_made_nyarch/))
|
||||||
|
|
94
uwufetch.c
94
uwufetch.c
|
@ -48,6 +48,7 @@ void print_ascii();
|
||||||
void print_info();
|
void print_info();
|
||||||
void print_image();
|
void print_image();
|
||||||
void usage(char*);
|
void usage(char*);
|
||||||
|
void uwu_name();
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
int opt = 0;
|
int opt = 0;
|
||||||
|
@ -75,6 +76,7 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
if (argc == 1 || a_i_flag == 0) print_ascii();
|
if (argc == 1 || a_i_flag == 0) print_ascii();
|
||||||
else if (a_i_flag) print_image();
|
else if (a_i_flag) print_image();
|
||||||
|
uwu_name();
|
||||||
print_info();
|
print_info();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,10 +116,7 @@ int pkgman() { // this is just a function that returns the total of installed pa
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_info() { // print collected info
|
void print_info() { // print collected info
|
||||||
char *start_cursor_position = "\033[9A\033[18C";
|
printf("\033[9A\033[18C%s%s%s@%s\n", NORMAL, BOLD, user, host);
|
||||||
//if (a_i_flag) start_cursor_position = "\033[8A\033[18C"; // this if - else is for a little bug
|
|
||||||
//else start_cursor_position = "\033[9A\033[18C";
|
|
||||||
printf("%s%s%s%s@%s\n", start_cursor_position, NORMAL, BOLD, user, host);
|
|
||||||
printf("\033[17C %s%sOWOS %s%s\n", NORMAL, BOLD, NORMAL, version_name);
|
printf("\033[17C %s%sOWOS %s%s\n", NORMAL, BOLD, NORMAL, version_name);
|
||||||
printf("\033[17C %s%sKERNEL %s%s %s\n", NORMAL, BOLD, NORMAL, sys_var.release, sys_var.machine);
|
printf("\033[17C %s%sKERNEL %s%s %s\n", NORMAL, BOLD, NORMAL, sys_var.release, sys_var.machine);
|
||||||
printf("\033[17C %s%sCPUWU %s%s\n", NORMAL, BOLD, NORMAL, cpu_model);
|
printf("\033[17C %s%sCPUWU %s%s\n", NORMAL, BOLD, NORMAL, cpu_model);
|
||||||
|
@ -184,7 +183,6 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
|
||||||
|
|
||||||
// linux
|
// linux
|
||||||
if (strcmp(version_name, "arch") == 0) {
|
if (strcmp(version_name, "arch") == 0) {
|
||||||
sprintf(version_name, "%s", "Nyarch Linuwu");
|
|
||||||
printf( "\033[1E\033[8C%s/\\\n"
|
printf( "\033[1E\033[8C%s/\\\n"
|
||||||
" / \\\n"
|
" / \\\n"
|
||||||
" /\\ \\\n"
|
" /\\ \\\n"
|
||||||
|
@ -193,7 +191,6 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
|
||||||
" / __| |__-\\\n"
|
" / __| |__-\\\n"
|
||||||
" /_-'' ''-_\\\n\n", BLUE);
|
" /_-'' ''-_\\\n\n", BLUE);
|
||||||
} else if (strcmp(version_name, "artix") == 0) {
|
} else if (strcmp(version_name, "artix") == 0) {
|
||||||
sprintf(version_name, "%s", "Nyartix Linuwu");
|
|
||||||
printf( "\033[1E\033[8C%s/\\\n"
|
printf( "\033[1E\033[8C%s/\\\n"
|
||||||
" / \\\n"
|
" / \\\n"
|
||||||
" /`'.,\\\n"
|
" /`'.,\\\n"
|
||||||
|
@ -202,7 +199,6 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
|
||||||
" / ,.'`. \\\n"
|
" / ,.'`. \\\n"
|
||||||
" /.,'` `'.\\\n\n", BLUE);
|
" /.,'` `'.\\\n\n", BLUE);
|
||||||
} else if (strcmp(version_name, "debian") == 0) {
|
} else if (strcmp(version_name, "debian") == 0) {
|
||||||
sprintf(version_name, "%s", "Debinyan");
|
|
||||||
printf( "\033[1E\033[6C%s______\n"
|
printf( "\033[1E\033[6C%s______\n"
|
||||||
" / ___ \\\n"
|
" / ___ \\\n"
|
||||||
" | / OwO |\n"
|
" | / OwO |\n"
|
||||||
|
@ -210,7 +206,6 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
|
||||||
" -_\n"
|
" -_\n"
|
||||||
" --_\n\n\n", RED);
|
" --_\n\n\n", RED);
|
||||||
} else if (strcmp(version_name, "fedora") == 0) {
|
} else if (strcmp(version_name, "fedora") == 0) {
|
||||||
sprintf(version_name, "%s", "Fedowoa");
|
|
||||||
printf( "\033[1E\033[8C%s_____\n"
|
printf( "\033[1E\033[8C%s_____\n"
|
||||||
" / __)%s\\\n"
|
" / __)%s\\\n"
|
||||||
" %s> %s| / %s<%s\\ \\\n"
|
" %s> %s| / %s<%s\\ \\\n"
|
||||||
|
@ -220,7 +215,6 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
|
||||||
" %s\\ \\%s__/ |\n"
|
" %s\\ \\%s__/ |\n"
|
||||||
" %s\\%s(_____/\n", BLUE, CYAN, WHITE, BLUE, WHITE, CYAN, BLUE, CYAN, BLUE, CYAN, BLUE, CYAN, BLUE, CYAN, BLUE, CYAN, BLUE);
|
" %s\\%s(_____/\n", BLUE, CYAN, WHITE, BLUE, WHITE, CYAN, BLUE, CYAN, BLUE, CYAN, BLUE, CYAN, BLUE, CYAN, BLUE, CYAN, BLUE);
|
||||||
} else if (strcmp(version_name, "gentoo") == 0) {
|
} else if (strcmp(version_name, "gentoo") == 0) {
|
||||||
sprintf(version_name, "%s", "GentOwO");
|
|
||||||
printf( "\033[1E\033[3C%s_-----_\n"
|
printf( "\033[1E\033[3C%s_-----_\n"
|
||||||
" ( \\\n"
|
" ( \\\n"
|
||||||
" \\ OwO \\\n"
|
" \\ OwO \\\n"
|
||||||
|
@ -229,7 +223,6 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
|
||||||
" ( _-\n"
|
" ( _-\n"
|
||||||
" \\____-\n\n", MAGENTA, WHITE);
|
" \\____-\n\n", MAGENTA, WHITE);
|
||||||
} else if (strcmp(version_name, "manjaro") == 0) {
|
} else if (strcmp(version_name, "manjaro") == 0) {
|
||||||
sprintf(version_name, "%s", "Myanjawo");
|
|
||||||
printf( "\033[0E\033[1C\u25b3 \u25b3 \u25e0\u25e0\u25e0\u25e0\n"
|
printf( "\033[0E\033[1C\u25b3 \u25b3 \u25e0\u25e0\u25e0\u25e0\n"
|
||||||
" \e[0;42m \e[0m \e[0;42m \e[0m\n"
|
" \e[0;42m \e[0m \e[0;42m \e[0m\n"
|
||||||
" \e[0;42m \e[0m\e[0;42m\e[1;30m > w < \e[0m\e[0;42m \e[0m \e[0;42m \e[0m\n"
|
" \e[0;42m \e[0m\e[0;42m\e[1;30m > w < \e[0m\e[0;42m \e[0m \e[0;42m \e[0m\n"
|
||||||
|
@ -239,7 +232,6 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
|
||||||
" \e[0;42m \e[0m \e[0;42m \e[0m \e[0;42m \e[0m\n"
|
" \e[0;42m \e[0m \e[0;42m \e[0m \e[0;42m \e[0m\n"
|
||||||
" \e[0;42m \e[0m \e[0;42m \e[0m \e[0;42m \e[0m\n");
|
" \e[0;42m \e[0m \e[0;42m \e[0m \e[0;42m \e[0m\n");
|
||||||
} else if (strcmp(version_name, "\"manjaro-arm\"") == 0) {
|
} else if (strcmp(version_name, "\"manjaro-arm\"") == 0) {
|
||||||
sprintf(version_name, "%s", "Myanjawo AWM");
|
|
||||||
printf( "\033[0E\033[1C\u25b3 \u25b3 \u25e0\u25e0\u25e0\u25e0\n"
|
printf( "\033[0E\033[1C\u25b3 \u25b3 \u25e0\u25e0\u25e0\u25e0\n"
|
||||||
" \e[0;42m \e[0m \e[0;42m \e[0m\n"
|
" \e[0;42m \e[0m \e[0;42m \e[0m\n"
|
||||||
" \e[0;42m \e[0m\e[0;42m\e[1;30m > w < \e[0m\e[0;42m \e[0m \e[0;42m \e[0m\n"
|
" \e[0;42m \e[0m\e[0;42m\e[1;30m > w < \e[0m\e[0;42m \e[0m \e[0;42m \e[0m\n"
|
||||||
|
@ -249,7 +241,6 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
|
||||||
" \e[0;42m \e[0m \e[0;42m \e[0m \e[0;42m \e[0m\n"
|
" \e[0;42m \e[0m \e[0;42m \e[0m \e[0;42m \e[0m\n"
|
||||||
" \e[0;42m \e[0m \e[0;42m \e[0m \e[0;42m \e[0m\n");
|
" \e[0;42m \e[0m \e[0;42m \e[0m \e[0;42m \e[0m\n");
|
||||||
} else if (strcmp(version_name, "ubuntu") == 0) {
|
} else if (strcmp(version_name, "ubuntu") == 0) {
|
||||||
sprintf(version_name, "%s", "UwUntu");
|
|
||||||
printf( "\033[1E\033[9C%s_\n"
|
printf( "\033[1E\033[9C%s_\n"
|
||||||
" %s\u25E3%s__(_)%s\u25E2%s\n"
|
" %s\u25E3%s__(_)%s\u25E2%s\n"
|
||||||
" _/ --- \\\n"
|
" _/ --- \\\n"
|
||||||
|
@ -257,11 +248,10 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
|
||||||
" \\ --- _/\n"
|
" \\ --- _/\n"
|
||||||
" %sC__/%s---(_)\n\n\n", LPINK, PINK, LPINK, PINK, LPINK, PINK, LPINK);
|
" %sC__/%s---(_)\n\n\n", LPINK, PINK, LPINK, PINK, LPINK, PINK, LPINK);
|
||||||
} else if (strcmp(version_name, "android") == 0) { // android at the end because it could be not considered as an actual distribution of gnu/linux
|
} else if (strcmp(version_name, "android") == 0) { // android at the end because it could be not considered as an actual distribution of gnu/linux
|
||||||
sprintf(version_name, "%s", "Nyandroid");
|
printf( "\033[2E\033[3C%s\\ _------_ /\n"
|
||||||
printf( "%s \n\\ _------_ /\n"
|
" / \\\n"
|
||||||
" / \\\n"
|
" | %s~ %s> w < %s~ %s|\n"
|
||||||
"| %s~ %s> w < %s~ %s|\n"
|
" ------------\n\n\n\n", GREEN, RED, GREEN, RED, GREEN);
|
||||||
" ------------\n", GREEN, RED, GREEN, RED, GREEN);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,45 +259,37 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
|
||||||
else if (strcmp(version_name, "openbsd") == 0) {
|
else if (strcmp(version_name, "openbsd") == 0) {
|
||||||
sprintf(version_name, "%s", "OwOpenBSD");
|
sprintf(version_name, "%s", "OwOpenBSD");
|
||||||
printf( "\033[1E\033[3C%s ______ \n"
|
printf( "\033[1E\033[3C%s ______ \n"
|
||||||
" \\- -/ %s\u2665 \n"
|
" \\- -/ %s\u2665 \n"
|
||||||
"%s\\_/ \\ \n"
|
"%s\\_/ \\ \n"
|
||||||
"| %s> < %s| \n"
|
"| %s> < %s| \n"
|
||||||
"|_ < %s// %sW %s// \n"
|
"|_ < %s// %sW %s// \n"
|
||||||
"%s/ \\ / \n"
|
"%s/ \\ / \n"
|
||||||
" /-________-\\ \n\n", YELLOW, RED, YELLOW, WHITE, YELLOW, RED, WHITE, RED, YELLOW);
|
" /-________-\\ \n\n", YELLOW, RED, YELLOW, WHITE, YELLOW, RED, WHITE, RED, YELLOW);
|
||||||
|
|
||||||
} else if (strcmp(version_name, "freebsd") == 0) {
|
} else if (strcmp(version_name, "freebsd") == 0) {
|
||||||
sprintf(version_name, "%s", "FweeBSD");
|
sprintf(version_name, "%s", "FweeBSD");
|
||||||
printf( "\033[1E\033[3C%s\n"
|
printf( "\033[1E\033[3C%s\n"
|
||||||
" /\\,-'''''-,/\\\n"
|
" /\\,-'''''-,/\\\n"
|
||||||
" \\_) (_/\n"
|
" \\_) (_/\n"
|
||||||
" | \\ / |\n"
|
" | \\ / |\n"
|
||||||
" | O w O |\n"
|
" | O w O |\n"
|
||||||
" ; ;\n"
|
" ; ;\n"
|
||||||
" '-_____-'\n", RED);
|
" '-_____-'\n", RED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_image() { // prints logo (as an image) of the given system. distributions listed alphabetically.
|
void print_image() { // prints logo (as an image) of the given system. distributions listed alphabetically.
|
||||||
char command[256];
|
char command[256];
|
||||||
sprintf(command, "viu -t -w 18 -h 8 /usr/lib/uwufetch/%s.png", version_name);
|
sprintf(command, "viu -t -w 18 -h 8 /usr/lib/uwufetch/%s.png 2> /dev/null", version_name);
|
||||||
system(command);
|
if (system(command) != 0) { // if viu is not installed
|
||||||
|
printf( "\033[1E\033[3C%s\n"
|
||||||
|
" There was an\n"
|
||||||
|
" error, maybe viu\n"
|
||||||
|
" is not installed.\n"
|
||||||
|
" Read IMAGES.md\n"
|
||||||
|
" for more info.\n\n", RED);
|
||||||
|
}
|
||||||
printf("\033[1E\033[0C\b");
|
printf("\033[1E\033[0C\b");
|
||||||
|
|
||||||
// linux
|
|
||||||
if (strcmp(version_name, "arch") == 0) sprintf(version_name, "%s", "Nyarch Linuwu");
|
|
||||||
else if (strcmp(version_name, "artix") == 0) sprintf(version_name, "%s", "Nyartix Linuwu");
|
|
||||||
else if (strcmp(version_name, "debian") == 0) sprintf(version_name, "%s", "Debinyan");
|
|
||||||
else if (strcmp(version_name, "fedora") == 0) sprintf(version_name, "%s", "Fedowa");
|
|
||||||
else if (strcmp(version_name, "gentoo") == 0) sprintf(version_name, "%s", "GentOwO");
|
|
||||||
else if (strcmp(version_name, "manjaro") == 0) sprintf(version_name, "%s", "Myanjawo");
|
|
||||||
else if (strcmp(version_name, "\"manjaro-arm\"") == 0) sprintf(version_name, "%s", "Myanjawo AWM");
|
|
||||||
else if (strcmp(version_name, "ubuntu") == 0) sprintf(version_name, "%s", "Uwuntu");
|
|
||||||
else if (strcmp(version_name, "android") == 0) sprintf(version_name, "%s", "Nyandroid"); // android at the end because it could be not considered as an actual distribution of gnu/linux
|
|
||||||
|
|
||||||
// BSD
|
|
||||||
if (strcmp(version_name, "openbsd") == 0) sprintf(version_name, "%s", "OwOpenBSD");
|
|
||||||
else if (strcmp(version_name, "freebsd") == 0) sprintf(version_name, "%s", "FweeBSD");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void usage(char* arg) {
|
void usage(char* arg) {
|
||||||
|
@ -320,3 +302,21 @@ void usage(char* arg) {
|
||||||
" <cat res/IMAGES.md> for more info%s\n",
|
" <cat res/IMAGES.md> for more info%s\n",
|
||||||
arg, YELLOW, NORMAL, BLUE, NORMAL);
|
arg, YELLOW, NORMAL, BLUE, NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void uwu_name() { // changes distro name to uwufied(?) name
|
||||||
|
// linux
|
||||||
|
if (strcmp(version_name, "arch") == 0) sprintf(version_name, "%s", "Nyarch Linuwu");
|
||||||
|
else if (strcmp(version_name, "artix") == 0) sprintf(version_name, "%s", "Nyartix Linuwu");
|
||||||
|
else if (strcmp(version_name, "debian") == 0) sprintf(version_name, "%s", "Debinyan");
|
||||||
|
else if (strcmp(version_name, "fedora") == 0) sprintf(version_name, "%s", "Fedowa");
|
||||||
|
else if (strcmp(version_name, "gentoo") == 0) sprintf(version_name, "%s", "GentOwO");
|
||||||
|
else if (strcmp(version_name, "manjaro") == 0) sprintf(version_name, "%s", "Myanjawo");
|
||||||
|
else if (strcmp(version_name, "\"manjaro-arm\"") == 0) sprintf(version_name, "%s", "Myanjawo AWM");
|
||||||
|
else if (strcmp(version_name, "ubuntu") == 0) sprintf(version_name, "%s", "Uwuntu");
|
||||||
|
else if (strcmp(version_name, "android") == 0) sprintf(version_name, "%s", "Nyandroid"); // android at the end because it could be not considered as an actual distribution of gnu/linux
|
||||||
|
|
||||||
|
// BSD
|
||||||
|
else if (strcmp(version_name, "openbsd") == 0) sprintf(version_name, "%s", "OwOpenBSD");
|
||||||
|
else if (strcmp(version_name, "freebsd") == 0) sprintf(version_name, "%s", "FweeBSD");
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue