From 96999a25d548bb3ce2a63bdbd93bea65e570b02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Fri, 12 Jul 2024 01:07:31 +0900 Subject: [PATCH] =?UTF-8?q?Rocky=20Linux=E3=83=AD=E3=82=B4=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/distro.c | 4 ++++ src/logo/linux.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec9d434..0554a9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Linuxロゴの修正(今も元気ハツラツ太郎さん) * Fedoraロゴの追加 * 他のディストリビューションのロゴの表示オプションの追加(LinuxとIllumosのみ) +* Rocky Linuxロゴの追加 # 0.1.1 * ストレージ情報の修正(今も元気ハツラツ太郎さん) diff --git a/src/distro.c b/src/distro.c index 36d8d39..f67b8cf 100644 --- a/src/distro.c +++ b/src/distro.c @@ -88,6 +88,10 @@ void get_distro() { else if (strstr(buf, "Alpine") != NULL) distroname = "alpine"; else if (strstr(buf, "Manjaro") != NULL) distroname = "manjaro"; else if (strstr(buf, "Gentoo") != NULL) distroname = "gentoo"; + else if (strstr(buf, "Fedora") != NULL) distroname = "fedora"; + else if (strstr(buf, "Rocky") != NULL) distroname = "rocky"; + else if (strstr(buf, "CentOS") != NULL) distroname = "centos"; + else if (strstr(buf, "Red Hat") != NULL) distroname = "redhat"; else if (strstr(buf, "postmarketOS") != NULL) distroname = "postmarketos"; else if (strstr(buf, "Linux Mint") != NULL) distroname = "linuxmint"; else if (strstr(buf, "opensuse") != NULL) distroname = "opensuse"; diff --git a/src/logo/linux.c b/src/logo/linux.c index a8bdd32..563d4bb 100644 --- a/src/logo/linux.c +++ b/src/logo/linux.c @@ -448,6 +448,37 @@ void getDistro(const char *distroname) { for (int i = 9; i < minsize; i++) { LOGO_SMALL[i] = GREEN " " RESET; } + } else if (strncmp((char *)logoname, "rocky", strlen("rocky")) == 0) { + color = GREEN; + titlecolor = GREEN; + logosize = 17; + + LOGO[0] = GREEN " .-/+oossssoo+/-. " RESET; + LOGO[1] = GREEN " `:+ssssssssssssssssss+:` " RESET; + LOGO[2] = GREEN " -+ssssssssssssssssssyyssss+- " RESET; + LOGO[3] = GREEN " .osssssssssssssssssssssssssssso. " RESET; + LOGO[4] = GREEN " /ssssssssssssssssssssssssssssssss/ " RESET; + LOGO[5] = GREEN " +ssssssssssssssssssssssssssssssssss+ " RESET; + LOGO[6] = GREEN " /ssssssssssssssssssssssssssssssssssss/ " RESET; + LOGO[7] = GREEN ".ssssssssssssssssssssssssssssssssssssss. " RESET; + LOGO[8] = GREEN "+ssssssssssssssssssssssssssssssssssssss+ " RESET; + LOGO[9] = GREEN ".sssssssssssssssssssss sssssssssssssss. " RESET; + LOGO[10] = GREEN " /sssssssssssssssss ssss sssssssssss/ " RESET; + LOGO[11] = GREEN " +ssssssssssssss ssssssss ssssssss+ " RESET; + LOGO[12] = GREEN " /sssssssssss sssssssssssss ssss/ " RESET; + LOGO[13] = GREEN " .osssssss sssssssssssssssss o. " RESET; + LOGO[14] = GREEN " -+sss sssssssssssssssssss+- " RESET; + LOGO[15] = GREEN " ` ssssssssssssssssss+:` " RESET; + LOGO[16] = GREEN " .-/+oossssoo+/-. " RESET; + + LOGO_SMALL[0] = GREEN " _____ " RESET; + LOGO_SMALL[1] = GREEN " / \\ " RESET; + LOGO_SMALL[2] = GREEN " | /\\ | " RESET; + LOGO_SMALL[3] = GREEN " | / \\| " RESET; + LOGO_SMALL[4] = GREEN " \\/____/ " RESET; + for (int i = 5; i < minsize; i++) { + LOGO_SMALL[i] = GREEN " " RESET; + } } else if (strncmp((char *)logoname, "ubuntu", strlen("ubuntu")) == 0) { color = RED; titlecolor = RED;