From 29de794e564ebd3a63cbac95a33dc2b0ccedb6e4 Mon Sep 17 00:00:00 2001 From: Guaxinim5573 Date: Sun, 4 Jul 2021 14:38:10 -0300 Subject: [PATCH 1/2] Uwufy kernel name --- uwufetch.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/uwufetch.c b/uwufetch.c index 0395be0..cbfc5d6 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -101,6 +101,7 @@ void print_ascii(); void print_info(); void print_image(); void usage(char *); +void uwu_kernel(); void uwu_name(); void truncate_name(char *); void remove_brackets(char *); @@ -154,6 +155,7 @@ int main(int argc, char *argv[]) print_ascii(); else if (ascii_image_flag == 1) print_image(); + uwu_kernel(); uwu_name(); print_info(); } @@ -889,6 +891,31 @@ void usage(char *arg) arg, BLUE, NORMAL); } +void uwu_kernel() +{ + #define KERNEL_TO_UWU(str, original, uwufied) \ + if (strcmp(str, original) == 0) \ + sprintf(str, "%s", uwufied) + + char *temp_kernel = kernel; + char *token; + char splitted[16][128] = {}; + + int count = 0; + while((token = strsep(&temp_kernel, " "))) { + strcpy(splitted[count], token); + count++; + } + strcpy(kernel, ""); + for(int i = 0;i < 16;i++) { + KERNEL_TO_UWU(splitted[i], "Linux", "Linuwu"); + KERNEL_TO_UWU(splitted[i], "linux", "linuwu"); + if(i != 0) strcat(kernel, " "); + strcat(kernel, splitted[i]); + } + #undef KERNEL_TO_UWU +} + void uwu_name() { // uwufies distro name From 23a78175d5f96b941482b5caca800ecd8ead64cd Mon Sep 17 00:00:00 2001 From: Guaxinim5573 Date: Sun, 4 Jul 2021 14:54:28 -0300 Subject: [PATCH 2/2] Add distro names to uwufy kernel --- uwufetch.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/uwufetch.c b/uwufetch.c index cbfc5d6..d928f76 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -908,8 +908,44 @@ void uwu_kernel() } strcpy(kernel, ""); for(int i = 0;i < 16;i++) { + + // kernel name KERNEL_TO_UWU(splitted[i], "Linux", "Linuwu"); KERNEL_TO_UWU(splitted[i], "linux", "linuwu"); + KERNEL_TO_UWU(splitted[i], "alpine", "Nyalpine"); + KERNEL_TO_UWU(splitted[i], "arch", "Nyarch Linuwu"); + KERNEL_TO_UWU(splitted[i], "artix", "Nyartix Linuwu"); + KERNEL_TO_UWU(splitted[i], "debian", "Debinyan"); + KERNEL_TO_UWU(splitted[i], "endeavouros", "endeavOwO"); + KERNEL_TO_UWU(splitted[i], "EndeavourOS", "endeavOwO"); + KERNEL_TO_UWU(splitted[i], "fedora", "Fedowa"); + KERNEL_TO_UWU(splitted[i], "gentoo", "GentOwO"); + KERNEL_TO_UWU(splitted[i], "gnu", "gnUwU"); + KERNEL_TO_UWU(splitted[i], "guix", "gnUwU gUwUix"); + KERNEL_TO_UWU(splitted[i], "linuxmint", "LinUWU Miwint"); + KERNEL_TO_UWU(splitted[i], "manjaro", "Myanjawo"); + KERNEL_TO_UWU(splitted[i], "\"manjaro-arm\"", "Myanjawo AWM"); + KERNEL_TO_UWU(splitted[i], "neon", "KDE NeOwOn"); + KERNEL_TO_UWU(splitted[i], "nixos", "nixOwOs"); + KERNEL_TO_UWU(splitted[i], "\"opensuse-leap\"", "OwOpenSUSE Leap"); + KERNEL_TO_UWU(splitted[i], "\"opensuse-tumbleweed\"", "OwOpenSUSE Tumbleweed"); + KERNEL_TO_UWU(splitted[i], "pop", "PopOwOS"); + KERNEL_TO_UWU(splitted[i], "raspbian", "RaspNyan"); + KERNEL_TO_UWU(splitted[i], "slackware", "Swackwawe"); + KERNEL_TO_UWU(splitted[i], "solus", "sOwOlus"); + KERNEL_TO_UWU(splitted[i], "ubuntu", "Uwuntu"); + KERNEL_TO_UWU(splitted[i], "\"void\"", "OwOid"); + KERNEL_TO_UWU(splitted[i], "android", "Nyandroid"); // android at the end because it could be not considered as an actual distribution of gnu/linux + + // BSD + KERNEL_TO_UWU(splitted[i], "freebsd", "FweeBSD"); + KERNEL_TO_UWU(splitted[i], "openbsd", "OwOpenBSD"); + + KERNEL_TO_UWU(splitted[i], "macos", "macOwOS"); + + // Windows + KERNEL_TO_UWU(splitted[i], "windows", "WinyandOwOws"); + if(i != 0) strcat(kernel, " "); strcat(kernel, splitted[i]); }