summaryrefslogtreecommitdiff
path: root/src/logo/linux_def.c
diff options
context:
space:
mode:
author諏訪子 <suwako@076.moe>2024-06-18 22:04:27 +0900
committer諏訪子 <suwako@076.moe>2024-06-18 22:04:27 +0900
commit261b39692f5b0ba5cfad6e7be4c8b40b94852155 (patch)
treea01c3ef17ac2ce3c708bed47a10aa6718971e568 /src/logo/linux_def.c
parent650879c4925ac04599735302378387741421345c (diff)
Linux: ロゴ(ry
Diffstat (limited to 'src/logo/linux_def.c')
-rw-r--r--src/logo/linux_def.c75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/logo/linux_def.c b/src/logo/linux_def.c
new file mode 100644
index 0000000..12a9ef2
--- /dev/null
+++ b/src/logo/linux_def.c
@@ -0,0 +1,75 @@
+#include "linux_def.h"
+
+#include <string.h>
+
+void getDistro(const char *distroname) {
+ if (strncmp((char *)distroname, "alpine", strlen("alpine")) == 0) {
+#undef DISTRO
+#undef COLOR
+#undef TITLECOLOR
+#define DISTRO DISTRO_ALPINE
+#define COLOR MAGENTA
+#define TITLECOLOR BLUE
+ } else if (strncmp((char *)distroname, "artix", strlen("artix")) == 0) {
+#undef DISTRO
+#undef COLOR
+#undef TITLECOLOR
+#define DISTRO DISTRO_ARCH
+#define COLOR CYAN
+#define TITLECOLOR CYAN
+ } else if (strncmp((char *)distroname, "arch", strlen("arch")) == 0) {
+#undef DISTRO
+#undef COLOR
+#undef TITLECOLOR
+#define DISTRO DISTRO_ARTIX
+#define COLOR CYAN
+#define TITLECOLOR CYAN
+ } else if (strncmp((char *)distroname, "crux", strlen("crux")) == 0) {
+#undef DISTRO
+#undef COLOR
+#undef TITLECOLOR
+#define DISTRO DISTRO_CRUX
+#define COLOR MAGENTA
+#define TITLECOLOR BLUE
+ } else if (strncmp((char *)distroname, "debian", strlen("debian")) == 0) {
+#undef DISTRO
+#undef COLOR
+#undef TITLECOLOR
+#define DISTRO DISTRO_DEBIAN
+#define COLOR RED
+#define TITLECOLOR RED
+ } else if (strncmp((char *)distroname, "devuan", strlen("devuan")) == 0) {
+#undef DISTRO
+#undef COLOR
+#undef TITLECOLOR
+#define DISTRO DISTRO_DEVUAN
+#define COLOR MAGENTA
+#define TITLECOLOR MAGENTA
+ } else if (strncmp((char *)distroname, "gentoo", strlen("gentoo")) == 0) {
+#undef DISTRO
+#undef COLOR
+#undef TITLECOLOR
+#define DISTRO DISTRO_GENTOO
+#define COLOR MAGENTA
+#define TITLECOLOR MAGENTA
+ } else if (
+ strncmp((char *)distroname,
+ "postmarketos",
+ strlen("postmarketos")
+ ) == 0
+ ) {
+#undef DISTRO
+#undef COLOR
+#undef TITLECOLOR
+#define DISTRO DISTRO_POSTMARKETOS
+#define COLOR GREEN
+#define TITLECOLOR GREEN
+ } else if (strncmp((char *)distroname, "void", strlen("void")) == 0) {
+#undef DISTRO
+#undef COLOR
+#undef TITLECOLOR
+#define DISTRO DISTRO_VOID
+#define COLOR WHITE
+#define TITLECOLOR GREEN
+ }
+}