Linux: ロゴ(ry

このコミットが含まれているのは:
守矢諏訪子 2024-06-18 22:04:27 +09:00
コミット 261b39692f
18個のファイルの変更446行の追加261行の削除

ファイルの表示

@ -32,7 +32,7 @@ MANPREFIX = ${PREFIX}/man
.endif
CC = cc
FILES = main.c src/*.c
FILES = main.c src/*.c src/logo/*.c
CFLAGS = -Wall -Wextra -O3 -I${PREFIX}/include -L${PREFIX}/lib
.if ${UNAME_S} == "NetBSD"
CFLAGS += -I/usr/pkg/include -L/usr/pkg/lib -I/usr/include -L/usr/lib

5
main.c
ファイルの表示

@ -1,11 +1,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "src/user.h"
#include "src/os.h"
#if defined(__linux__)
#include "src/distro.h"
#include "src/logo/linux_def.h"
#endif
#include "src/host.h"
#include "src/uptime.h"
@ -32,6 +32,9 @@ int main(int argc, char *argv[]) {
#include "src/logo/netbsd.h"
#elif defined(__FreeBSD__)
#include "src/logo/freebsd.h"
#elif defined(__linux__)
getDistro(distroname);
#include "src/logo/linux.h"
#else
#define COLOR "\e[1;30m"
#define RESET "\e[0m"

ファイルの表示

@ -1,29 +0,0 @@
#define BLUE "\e[1;34m"
#define MAGENTA "\e[1;35m"
#define RESET "\e[0m"
#define COLOR MAGENTA
#define TITLECOLOR BLUE
char *LOGO[] = {
BLUE " .hddddddddddddddddddddddh. ",
" :dddddddddddddddddddddddddd: ",
" /dddddddddddddddddddddddddddd/ ",
" +dddddddddddddddddddddddddddddd+ ",
" `sdddddddddddddddddddddddddddddddds` ",
" `ydddddddddddd++hdddddddddddddddddddy` ",
".hddddddddddd+` `+ddddh:-sdddddddddddh. ",
"hdddddddddd+` `+y: .sddddddddddh ",
"ddddddddh+` `//` `.` -sddddddddd ",
"ddddddh+` `/hddh/` `:s- -sddddddd ",
"ddddh+` `/+/dddddh/` `+s- -sddddd ",
"ddd+` `/o` :dddddddh/` `oy- .yddd ",
"hdddyo+ohddyosdddddddddho+oydddy++ohdddh ",
".hddddddddddddddddddddddddddddddddddddh. ",
" `yddddddddddddddddddddddddddddddddddy` ",
" `sdddddddddddddddddddddddddddddddds` ",
" +dddddddddddddddddddddddddddddd+ ",
" /dddddddddddddddddddddddddddd/ ",
" :dddddddddddddddddddddddddd: ",
" .hddddddddddddddddddddddh. " RESET
};

ファイルの表示

@ -1,27 +0,0 @@
#define CYAN "\e[1;36m"
#define RESET "\e[0m"
#define COLOR CYAN
#define TITLECOLOR CYAN
char *LOGO[] = {
CYAN " -` " RESET,
CYAN " .o+` " RESET,
CYAN " `ooo/ " RESET,
CYAN " `+oooo: " RESET,
CYAN " `+oooooo: " RESET,
CYAN " -+oooooo+: " RESET,
CYAN " `/:-:++oooo+: " RESET,
CYAN " `/++++/+++++++: " RESET,
CYAN " `/++++++++++++++: " RESET,
CYAN " `/+++ooooooooooooo/` " RESET,
CYAN " ./ooosssso++osssssso+` " RESET,
CYAN " .oossssso-````/ossssss+` " RESET,
CYAN " -osssssso. :ssssssso. " RESET,
CYAN " :osssssss/ osssso+++. " RESET,
CYAN " /ossssssss/ +ssssooo/- " RESET,
CYAN " `/ossssso+/:- -:/+osssso+- " RESET,
CYAN " `+sso+:-` `.-/+oso: " RESET,
CYAN "`++:. `-/+/ " RESET,
CYAN ".` `/ " RESET
};

ファイルの表示

@ -1,28 +0,0 @@
#define CYAN "\e[1;36m"
#define RESET "\e[0m"
#define COLOR CYAN
#define TITLECOLOR CYAN
char *LOGO[] = {
CYAN " ' " RESET,
CYAN " 'o' " RESET,
CYAN " 'ooo' " RESET,
CYAN " 'ooxoo' " RESET,
CYAN " 'ooxxxoo' " RESET,
CYAN " 'oookkxxoo' " RESET,
CYAN " 'oiioxkkxxoo' " RESET,
CYAN " ':;:iiiioxxxoo' " RESET,
CYAN " `'.;::ioxxoo' " RESET,
CYAN " '-. `':;jiooo' " RESET,
CYAN " 'oooio-.. `'i:io' " RESET,
CYAN " 'ooooxxxxoio:,. `'-;' " RESET,
CYAN " 'ooooxxxxxkkxoooIi:-. `' " RESET,
CYAN " 'ooooxxxxxkkkkxoiiiiiji' " RESET,
CYAN " 'ooooxxxxxkxxoiiii:'` .i' " RESET,
CYAN " 'ooooxxxxxoi:::'` .;ioxo' " RESET,
CYAN " 'ooooxooi::'` .:iiixkxxo' " RESET,
CYAN " 'ooooi:'` `'';ioxxo' " RESET,
CYAN " 'i:'` '':io' " RESET,
CYAN "'` `' " RESET
};

ファイルの表示

@ -1,28 +0,0 @@
#define BLUE "\e[1;34m"
#define MAGENTA "\e[1;35m"
#define WHITE "\e[1;37m"
#define RESET "\e[0m"
#define COLOR MAGENTA
#define TITLECOLOR BLUE
char *LOGO[] = {
BLUE " odddd " RESET,
BLUE " oddxkkkxxdoo " RESET,
BLUE " ddcoddxxxdoool " RESET,
BLUE " xdclodod olol " RESET,
BLUE " xoc xdd olol " RESET,
BLUE " xdc " MAGENTA "k00" BLUE "Okdlol " RESET,
BLUE " xxd" MAGENTA "kOKKKOkd" BLUE "ldd " RESET,
BLUE " xdco" MAGENTA "xOkdlo" BLUE "dldd " RESET,
BLUE " ddc:cl" MAGENTA "lll" BLUE "oooodo " RESET,
BLUE " odxxdd" WHITE "xkO000kx" BLUE "ooxdo " RESET,
BLUE " oxdd" WHITE "x0NMMMMMMWW0od" BLUE "kkxo " RESET,
BLUE " oooxd" WHITE "0WMMMMMMMMMW0o" BLUE "dxkx " RESET,
BLUE "docldkXW" WHITE "MMMMMMMWWN" BLUE "Odolco " RESET,
BLUE "xx" MAGENTA "dx" BLUE "kxxOKN" WHITE "WMMWN" BLUE "0xdoxo::c " RESET,
MAGENTA "xOkkO" BLUE "0oo" WHITE "odOW" MAGENTA "WW" BLUE "XkdodOxc:l " RESET,
MAGENTA "dkkkxkkk" WHITE "OKX" MAGENTA "NNNX0Oxx" BLUE "xc:cd " RESET,
MAGENTA " odxxdx" WHITE "xllod" MAGENTA "ddooxx" BLUE "dc:ldo " RESET,
MAGENTA " lodd" BLUE "dolccc" MAGENTA "ccox" BLUE "xoloo " RESET
};

ファイルの表示

@ -1,27 +0,0 @@
#define RED "\e[1;31m"
#define WHITE "\e[1;37m"
#define RESET "\e[0m"
#define COLOR RED
#define TITLECOLOR RED
char *LOGO[] = {
WHITE " _,met$$$$$gg. " RESET,
WHITE " ,g$$$$$$$$$$$$$$$P. " RESET,
WHITE " ,g$$P\" \"\"\"Y$$.\". " RESET,
WHITE " ,$$P' `$$$. " RESET,
WHITE "',$$P ,ggs. `$$b: " RESET,
WHITE "`d$$' ,$P\"' " RED "." WHITE " $$$ " RESET,
WHITE " $$P d$' " RED "," WHITE " $$P " RESET,
WHITE " $$: $$. - ,d$$' " RESET,
WHITE " $$; Y$b._ _,d$P' " RESET,
WHITE " Y$$. " RED "`." WHITE "`\"Y$$$$P\"' " RESET,
WHITE " `$$b " RED "\"-.__" WHITE " " RESET,
WHITE " `Y$$ " RESET,
WHITE " `Y$$. " RESET,
WHITE " `$$b. " RESET,
WHITE " `Y$$b. " RESET,
WHITE " `\"Y$b._ " RESET,
WHITE " `\"\"\" " RESET,
WHITE " " RESET
};

ファイルの表示

@ -1,26 +0,0 @@
#define MAGENTA "\e[1;35m"
#define RESET "\e[0m"
#define COLOR MAGENTA
#define TITLECOLOR MAGENTA
char *LOGO[] = {
MAGENTA " ..,,;;;::;,.. " RESET,
MAGENTA " `':ddd;:,. " RESET,
MAGENTA " `'dPPd:,. " RESET,
MAGENTA " `:b$$b`. " RESET,
MAGENTA " 'P$$$d` " RESET,
MAGENTA " .$$$$$` " RESET,
MAGENTA " ;$$$$$P " RESET,
MAGENTA " .:P$$$$$$` " RESET,
MAGENTA " .,:b$$$$$$$;' " RESET,
MAGENTA " .,:dP$$$$$$$$b:' " RESET,
MAGENTA " .,:;db$$$$$$$$$$Pd'` " RESET,
MAGENTA " ,db$$$$$$$$$$$$$$b:'` " RESET,
MAGENTA ":$$$$$$$$$$$$b:'` " RESET,
MAGENTA " `$$$$$bd:''` " RESET,
MAGENTA " `'''` " RESET,
MAGENTA " " RESET,
MAGENTA " " RESET,
MAGENTA " " RESET
};

ファイルの表示

@ -1,3 +1,6 @@
#ifndef LOGO_FREEBSD_H
#define LOGO_FREEBSD_H
#define RED "\e[1;31m"
#define WHITE "\e[1;37m"
#define RESET "\e[0m"
@ -34,3 +37,5 @@ RED "| | " RESET,
RED " ; ; " RESET,
RED " '-_____-' " RESET
};
#endif

ファイルの表示

@ -1,27 +0,0 @@
#define MAGENTA "\e[1;35m"
#define WHITE "\e[1;37m"
#define RESET "\e[0m"
#define COLOR MAGENTA
#define TITLECOLOR MAGENTA
char *LOGO[] = {
MAGENTA " -/oyddmdhs+:. " RESET,
MAGENTA " -o" WHITE "dNMMMMMMMMNNmhy+" MAGENTA "-` " RESET,
MAGENTA " -y" WHITE "NMMMMMMMMMMMNNNmmdhy" MAGENTA "+- " RESET,
MAGENTA " `o" WHITE "mMMMMMMMMMMMMNmdmmmmddhhy" MAGENTA "/` " RESET,
MAGENTA " om" WHITE "MMMMMMMMMMMN" MAGENTA "hhyyyo" WHITE "hmdddhhhd" MAGENTA "o` " RESET,
MAGENTA ".y" WHITE "dMMMMMMMMMMd" MAGENTA "hs++so/s" WHITE "mdddhhhhdm" MAGENTA "+` " RESET,
MAGENTA " oy" WHITE "hdmNMMMMMMMN" MAGENTA "dyooy" WHITE "dmddddhhhhyhN" MAGENTA "d. " RESET,
MAGENTA " :o" WHITE "yhhdNNMMMMMMMNNNmmdddhhhhhyym" MAGENTA "Mh " RESET,
MAGENTA " .:" WHITE "+sydNMMMMMNNNmmmdddhhhhhhmM" MAGENTA "my " RESET,
MAGENTA " /m" WHITE "MMMMMMNNNmmmdddhhhhhmMNh" MAGENTA "s: " RESET,
MAGENTA " `o" WHITE "NMMMMMMMNNNmmmddddhhdmMNhs" MAGENTA "+` " RESET,
MAGENTA " `s" WHITE "NMMMMMMMMNNNmmmdddddmNMmhs" MAGENTA "/. " RESET,
MAGENTA " /N" WHITE "MMMMMMMMNNNNmmmdddmNMNdso" MAGENTA ":` " RESET,
MAGENTA "+M" WHITE "MMMMMMNNNNNmmmmdmNMNdso" MAGENTA "/- " RESET,
MAGENTA "yM" WHITE "MNNNNNNNmmmmmNNMmhs+/" MAGENTA" -` " RESET,
MAGENTA "/h" WHITE "MMNNNNNNNNMNdhs++/" MAGENTA "-` " RESET,
MAGENTA "`/" WHITE "ohdmmddhys+++/:" MAGENTA ".` " RESET,
MAGENTA " `-//////:--. " RESET
};

ファイルの表示

@ -1,11 +1,40 @@
#ifndef LOGO_LINUX_H
#define LOGO_LINUX_H
#include "../distro.h"
#define GREY "\e[1;30m"
#define RED "\e[1;31m"
#define GREEN "\e[1;32m"
#define YELLOW "\e[1;33m"
#define BLUE "\e[1;34m"
#define MAGENTA "\e[1;35m"
#define CYAN "\e[1;36m"
#define WHITE "\e[1;37m"
#define RESET "\e[0m"
#define COLOR WHITE
#define TITLECOLOR WHITE
#define DISTRO_LINUX 0
#define DISTRO_ALPINE 1
#define DISTRO_ARCH 2
#define DISTRO_ARTIX 3
#define DISTRO_CRUX 4
#define DISTRO_DEBIAN 5
#define DISTRO_DEVUAN 6
#define DISTRO_GENTOO 7
#define DISTRO_POSTMARKETOS 8
#define DISTRO_VOID 9
#ifndef DISTRO
#define DISTRO DISTRO_LINUX
#endif
#define COLOR WHITE
#define TITLECOLOR WHITE
#if DISTRO == DISTRO_LINUX
char *LOGO[] = {
GREY " ##### " RESET,
GREY " ####### " RESET,
@ -26,3 +55,314 @@ GREY " " RESET,
GREY " " RESET,
GREY " " RESET
};
char *LOGO_SMALL[] = {
GREY " ___ " RESET,
GREY " / \\ " RESET,
GREY " |" WHITE "0 0" GREY "| " RESET,
GREY " | " YELLOW "v" GREY " | " RESET,
GREY " / " WHITE "/ \\" GREY " \\ " RESET,
GREY " | " WHITE "\\_/" GREY " | " RESET,
YELLOW "/ " GREY "_____" YELLOW " \\ " RESET,
YELLOW "\\/ \\/ " RESET
};
#elif DISTRO == DISTRO_ALPINE
// Alpine
char *LOGO[] = {
BLUE " .hddddddddddddddddddddddh. " RESET,
BLUE " :dddddddddddddddddddddddddd: " RESET,
BLUE " /dddddddddddddddddddddddddddd/ " RESET,
BLUE " +dddddddddddddddddddddddddddddd+ " RESET,
BLUE " `sdddddddddddddddddddddddddddddddds` " RESET,
BLUE " `ydddddddddddd++hdddddddddddddddddddy` " RESET,
BLUE ".hddddddddddd+` `+ddddh:-sdddddddddddh. " RESET,
BLUE "hdddddddddd+` `+y: .sddddddddddh " RESET,
BLUE "ddddddddh+` `//` `.` -sddddddddd " RESET,
BLUE "ddddddh+` `/hddh/` `:s- -sddddddd " RESET,
BLUE "ddddh+` `/+/dddddh/` `+s- -sddddd " RESET,
BLUE "ddd+` `/o` :dddddddh/` `oy- .yddd " RESET,
BLUE "hdddyo+ohddyosdddddddddho+oydddy++ohdddh " RESET,
BLUE ".hddddddddddddddddddddddddddddddddddddh. " RESET,
BLUE " `yddddddddddddddddddddddddddddddddddy` " RESET,
BLUE " `sdddddddddddddddddddddddddddddddds` " RESET,
BLUE " +dddddddddddddddddddddddddddddd+ " RESET,
BLUE " /dddddddddddddddddddddddddddd/ " RESET,
BLUE " :dddddddddddddddddddddddddd: " RESET,
BLUE " .hddddddddddddddddddddddh. " RESET
};
char *LOGO_SMALL[] = {
BLUE " /\\ /\\ " RESET,
BLUE " /" WHITE "/ " BLUE "\\ \\ " RESET,
BLUE " /" WHITE "/ " BLUE "\\ \\ " RESET,
BLUE "/" WHITE "// " BLUE "\\ \\ " RESET,
WHITE "// " BLUE "\\ \\ " RESET,
BLUE " \\ " RESET
};
#elif DISTRO == DISTRO_ARCH
// Arch
char *LOGO[] = {
CYAN " -` " RESET,
CYAN " .o+` " RESET,
CYAN " `ooo/ " RESET,
CYAN " `+oooo: " RESET,
CYAN " `+oooooo: " RESET,
CYAN " -+oooooo+: " RESET,
CYAN " `/:-:++oooo+: " RESET,
CYAN " `/++++/+++++++: " RESET,
CYAN " `/++++++++++++++: " RESET,
CYAN " `/+++ooooooooooooo/` " RESET,
CYAN " ./ooosssso++osssssso+` " RESET,
CYAN " .oossssso-````/ossssss+` " RESET,
CYAN " -osssssso. :ssssssso. " RESET,
CYAN " :osssssss/ osssso+++. " RESET,
CYAN " /ossssssss/ +ssssooo/- " RESET,
CYAN " `/ossssso+/:- -:/+osssso+- " RESET,
CYAN " `+sso+:-` `.-/+oso: " RESET,
CYAN "`++:. `-/+/ " RESET,
CYAN ".` `/ " RESET
};
char *LOGO_SMALL[] = {
CYAN " /\\ " RESET,
CYAN " / \\ " RESET,
CYAN " /\\ \\ " RESET,
WHITE " / \\ " RESET,
WHITE " / ,, \\ " RESET,
WHITE " / | | -\\ " RESET,
WHITE "/_-'' ''-_\\ " RESET
};
#elif DISTRO == DISTRO_ARTIX
// Artix
char *LOGO[] = {
CYAN " ' " RESET,
CYAN " 'o' " RESET,
CYAN " 'ooo' " RESET,
CYAN " 'ooxoo' " RESET,
CYAN " 'ooxxxoo' " RESET,
CYAN " 'oookkxxoo' " RESET,
CYAN " 'oiioxkkxxoo' " RESET,
CYAN " ':;:iiiioxxxoo' " RESET,
CYAN " `'.;::ioxxoo' " RESET,
CYAN " '-. `':;jiooo' " RESET,
CYAN " 'oooio-.. `'i:io' " RESET,
CYAN " 'ooooxxxxoio:,. `'-;' " RESET,
CYAN " 'ooooxxxxxkkxoooIi:-. `' " RESET,
CYAN " 'ooooxxxxxkkkkxoiiiiiji' " RESET,
CYAN " 'ooooxxxxxkxxoiiii:'` .i' " RESET,
CYAN " 'ooooxxxxxoi:::'` .;ioxo' " RESET,
CYAN " 'ooooxooi::'` .:iiixkxxo' " RESET,
CYAN " 'ooooi:'` `'';ioxxo' " RESET,
CYAN " 'i:'` '':io' " RESET,
CYAN "'` `' " RESET
};
char *LOGO_SMALL[] = {
CYAN " /\\ " RESET,
CYAN " / \\ " RESET,
CYAN " /`'.,\\ " RESET,
CYAN " / ', " RESET,
CYAN " / ,`\\ " RESET,
CYAN " / ,.'`. \\ " RESET,
CYAN "/.,'` `'.\\ " RESET
};
#elif DISTRO == DISTRO_CRUX
// CRUX
char *LOGO[] = {
BLUE " odddd " RESET,
BLUE " oddxkkkxxdoo " RESET,
BLUE " ddcoddxxxdoool " RESET,
BLUE " xdclodod olol " RESET,
BLUE " xoc xdd olol " RESET,
BLUE " xdc " MAGENTA "k00" BLUE "Okdlol " RESET,
BLUE " xxd" MAGENTA "kOKKKOkd" BLUE "ldd " RESET,
BLUE " xdco" MAGENTA "xOkdlo" BLUE "dldd " RESET,
BLUE " ddc:cl" MAGENTA "lll" BLUE "oooodo " RESET,
BLUE " odxxdd" WHITE "xkO000kx" BLUE "ooxdo " RESET,
BLUE " oxdd" WHITE "x0NMMMMMMWW0od" BLUE "kkxo " RESET,
BLUE " oooxd" WHITE "0WMMMMMMMMMW0o" BLUE "dxkx " RESET,
BLUE "docldkXW" WHITE "MMMMMMMWWN" BLUE "Odolco " RESET,
BLUE "xx" MAGENTA "dx" BLUE "kxxOKN" WHITE "WMMWN" BLUE "0xdoxo::c " RESET,
MAGENTA "xOkkO" BLUE "0oo" WHITE "odOW" MAGENTA "WW" BLUE "XkdodOxc:l " RESET,
MAGENTA "dkkkxkkk" WHITE "OKX" MAGENTA "NNNX0Oxx" BLUE "xc:cd " RESET,
MAGENTA " odxxdx" WHITE "xllod" MAGENTA "ddooxx" BLUE "dc:ldo " RESET,
MAGENTA " lodd" BLUE "dolccc" MAGENTA "ccox" BLUE "xoloo " RESET
};
char *LOGO_SMALL[] = {
BLUE " ___ " RESET,
BLUE " (" WHITE "" BLUE " | " RESET,
BLUE " (" MAGENTA "<>" BLUE " | " RESET,
BLUE " / " WHITE "__" BLUE " \\ " RESET,
BLUE " ( " WHITE "/ \\" BLUE " /| " RESET,
MAGENTA "_" BLUE "/\\ "WHITE "__)" BLUE "/" MAGENTA "_" BLUE ") " RESET,
MAGENTA "\\/" BLUE "-____" MAGENTA "\\/ " RESET
};
#elif DISTRO == DISTRO_DEBIAN
// Debian
char *LOGO[] = {
WHITE " _,met$$$$$gg. " RESET,
WHITE " ,g$$$$$$$$$$$$$$$P. " RESET,
WHITE " ,g$$P\" \"\"\"Y$$.\". " RESET,
WHITE " ,$$P' `$$$. " RESET,
WHITE "',$$P ,ggs. `$$b: " RESET,
WHITE "`d$$' ,$P\"' " RED "." WHITE " $$$ " RESET,
WHITE " $$P d$' " RED "," WHITE " $$P " RESET,
WHITE " $$: $$. - ,d$$' " RESET,
WHITE " $$; Y$b._ _,d$P' " RESET,
WHITE " Y$$. " RED "`." WHITE "`\"Y$$$$P\"' " RESET,
WHITE " `$$b " RED "\"-.__" WHITE " " RESET,
WHITE " `Y$$ " RESET,
WHITE " `Y$$. " RESET,
WHITE " `$$b. " RESET,
WHITE " `Y$$b. " RESET,
WHITE " `\"Y$b._ " RESET,
WHITE " `\"\"\" " RESET,
WHITE " " RESET
};
char *LOGO_SMALL[] = {
RED " _____ " RESET,
RED " / __ \\ " RESET,
RED "| / | " RESET,
RED "| \\___- " RESET,
RED "-_ " RESET,
RED " --_ " RESET
};
#elif DISTRO == DISTRO_DEVUAN
// Devuan
char *LOGO[] = {
MAGENTA " ..,,;;;::;,.. " RESET,
MAGENTA " `':ddd;:,. " RESET,
MAGENTA " `'dPPd:,. " RESET,
MAGENTA " `:b$$b`. " RESET,
MAGENTA " 'P$$$d` " RESET,
MAGENTA " .$$$$$` " RESET,
MAGENTA " ;$$$$$P " RESET,
MAGENTA " .:P$$$$$$` " RESET,
MAGENTA " .,:b$$$$$$$;' " RESET,
MAGENTA " .,:dP$$$$$$$$b:' " RESET,
MAGENTA " .,:;db$$$$$$$$$$Pd'` " RESET,
MAGENTA " ,db$$$$$$$$$$$$$$b:'` " RESET,
MAGENTA ":$$$$$$$$$$$$b:'` " RESET,
MAGENTA " `$$$$$bd:''` " RESET,
MAGENTA " `'''` " RESET,
MAGENTA " " RESET,
MAGENTA " " RESET,
MAGENTA " " RESET
};
char *LOGO_SMALL[] = {
MAGENTA "__ " RESET,
MAGENTA " \\ " RESET,
MAGENTA " _/ " RESET
};
#elif DISTRO == DISTRO_GENTOO
// Gentoo
char *LOGO[] = {
MAGENTA " -/oyddmdhs+:. " RESET,
MAGENTA " -o" WHITE "dNMMMMMMMMNNmhy+" MAGENTA "-` " RESET,
MAGENTA " -y" WHITE "NMMMMMMMMMMMNNNmmdhy" MAGENTA "+- " RESET,
MAGENTA " `o" WHITE "mMMMMMMMMMMMMNmdmmmmddhhy" MAGENTA "/` " RESET,
MAGENTA " om" WHITE "MMMMMMMMMMMN" MAGENTA "hhyyyo" WHITE "hmdddhhhd" MAGENTA "o` " RESET,
MAGENTA ".y" WHITE "dMMMMMMMMMMd" MAGENTA "hs++so/s" WHITE "mdddhhhhdm" MAGENTA "+` " RESET,
MAGENTA " oy" WHITE "hdmNMMMMMMMN" MAGENTA "dyooy" WHITE "dmddddhhhhyhN" MAGENTA "d. " RESET,
MAGENTA " :o" WHITE "yhhdNNMMMMMMMNNNmmdddhhhhhyym" MAGENTA "Mh " RESET,
MAGENTA " .:" WHITE "+sydNMMMMMNNNmmmdddhhhhhhmM" MAGENTA "my " RESET,
MAGENTA " /m" WHITE "MMMMMMNNNmmmdddhhhhhmMNh" MAGENTA "s: " RESET,
MAGENTA " `o" WHITE "NMMMMMMMNNNmmmddddhhdmMNhs" MAGENTA "+` " RESET,
MAGENTA " `s" WHITE "NMMMMMMMMNNNmmmdddddmNMmhs" MAGENTA "/. " RESET,
MAGENTA " /N" WHITE "MMMMMMMMNNNNmmmdddmNMNdso" MAGENTA ":` " RESET,
MAGENTA "+M" WHITE "MMMMMMNNNNNmmmmdmNMNdso" MAGENTA "/- " RESET,
MAGENTA "yM" WHITE "MNNNNNNNmmmmmNNMmhs+/" MAGENTA" -` " RESET,
MAGENTA "/h" WHITE "MMNNNNNNNNMNdhs++/" MAGENTA "-` " RESET,
MAGENTA "`/" WHITE "ohdmmddhys+++/:" MAGENTA ".` " RESET,
MAGENTA " `-//////:--. " RESET
};
char *LOGO_SMALL[] = {
MAGENTA " _-----_ " RESET,
MAGENTA "( \\ " RESET,
MAGENTA "\\ 0 \\ " RESET,
WHITE " \\ ) " RESET,
WHITE " / _/ " RESET,
WHITE "( _- " RESET,
WHITE "\\____- " RESET
};
#elif DISTRO == DISTRO_POSTMARKETOS
// postmarketOS
char *LOGO[] = {
GREEN " /\\ " RESET,
GREEN " / \\ " RESET,
GREEN " / \\ " RESET,
GREEN " / \\ " RESET,
GREEN " / \\ " RESET,
GREEN " / \\ " RESET,
GREEN " \\ \\ " RESET,
GREEN " /\\ \\____ \\ " RESET,
GREEN " / \\____ \\ \\ " RESET,
GREEN " / / \\ \\ " RESET,
GREEN " / / \\ ___\\ " RESET,
GREEN " / / \\ / ____ " RESET,
GREEN " / / \\/ / \\ " RESET,
GREEN " / / __________/ \\ " RESET,
GREEN " / \\ \\ \\ " RESET,
GREEN " / \\ \\ \\ " RESET,
GREEN " / / / \\ " RESET,
GREEN "/___________/ /____________________\\ " RESET,
GREEN " " RESET
};
char *LOGO_SMALL[] = {
GREEN " /\\ " RESET,
GREEN " / \\ " RESET,
GREEN " / \\ " RESET,
GREEN " \\__ \\ " RESET,
GREEN " /\\__ \\ _\\ " RESET,
GREEN " / / \\/ __ " RESET,
GREEN " / / ____/ \\ " RESET,
GREEN " / \\ \\ \\ " RESET,
GREEN "/_____/ /________\\ " RESET
};
#elif DISTRO == DISTRO_VOID
// Void
char *LOGO[] = {
GREEN " __.;=====;.__ " RESET,
GREEN " _.=+==++=++=+=+===;. " RESET,
GREEN " -=+++=+===+=+=+++++=_ " RESET,
GREEN " . -=:`` `--==+=++==. " RESET,
GREEN " _vi, ` --+=++++: " RESET,
GREEN " .uvnvi. _._ -==+==+. " RESET,
GREEN " .vvnvnI` .;==|==;. :|=||=|. " RESET,
GREY "+QmQQm" GREEN "pvvnv; " GREY "_yYsyQQWUUQQQm #QmQ#" GREEN ":" GREY "QQQWUV$QQm. " RESET,
GREY " -QQWQW" GREEN "pvvo" GREY "wZ?.wQQQE" GREEN "==<" GREY "!QWWQ/QWQW.QQWW" GREEN "(: " GREY "jQWQE " RESET,
GREY " -$QQQQmmU' jQQQ@" GREEN "+=<" GREY "QWQQ)mQQQ.mQQQC" GREEN "+;" GREY "jWQQ@' " RESET,
GREY " -$WQ8Y" GREEN "nI: " GREY "QWQQwgQQWV" GREEN"`" GREY "mWQQ.jQWQQgyyWW@! " RESET,
GREEN " -1vvnvv. `~+++` ++|+++ " RESET,
GREEN " +vnvnnv, `-|=== " RESET,
GREEN " +vnvnvns. . :=- " RESET,
GREEN " -Invnvvnsi..___..=sv=. ` " RESET,
GREEN " +Invnvnvnnnnnnnnvvnn;. " RESET,
GREEN " ~|Invnvnvvnvvvnnv}+` " RESET,
GREEN " -~|{*l}*|~ " RESET,
GREEN " " RESET,
GREEN " " RESET
};
char *LOGO_SMALL[] = {
GREEN " _______ " RESET,
GREEN " _ \\______ - " RESET,
GREEN "| \\ ___ \\ | " RESET,
GREEN "| | / \\ | | " RESET,
GREEN "| | \\___/ | | " RESET,
GREEN "| \\______ \\_| " RESET,
GREEN " -_______\\ " RESET
};
#endif
#endif

75
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
}
}

6
src/logo/linux_def.h ノーマルファイル
ファイルの表示

@ -0,0 +1,6 @@
#ifndef LINUX_DEF_H
#define LINUX_DEF_H
void getDistro(const char *distroname);
#endif

ファイルの表示

@ -1,3 +1,6 @@
#ifndef LOGO_NETBSD_H
#define LOGO_NETBSD_H
#define MAGENTA "\e[1;35m"
#define WHITE "\e[1;37m"
#define RESET "\e[0m"
@ -35,3 +38,5 @@ char *LOGO_SMALL[] = {
" \\\\ " RESET,
" \\\\ " RESET
};
#endif

ファイルの表示

@ -1,3 +1,6 @@
#ifndef LOGO_OPENBSD_H
#define LOGO_OPENBSD_H
#define GREY "\e[1;30m"
#define RED "\e[1;31m"
#define YELLOW "\e[1;33m"
@ -46,3 +49,5 @@ YELLOW " " RESET,
YELLOW " " RESET,
YELLOW " " RESET
};
#endif

ファイルの表示

@ -1,3 +1,6 @@
#ifndef LOGO_OPENINDIANA_H
#define LOGO_OPENINDIANA_H
#define BLUE "\e[1;34m"
#define WHITE "\e[1;37m"
#define RESET "\e[0m"
@ -26,3 +29,5 @@ WHITE " " RESET,
WHITE " " RESET,
WHITE " " RESET
};
#endif

ファイルの表示

@ -1,27 +0,0 @@
#define GREEN "\e[1;32m"
#define RESET "\e[0m"
#define COLOR GREEN
#define TITLECOLOR GREEN
char *LOGO[] = {
GREEN " /\\ " RESET,
GREEN " / \\ " RESET,
GREEN " / \\ " RESET,
GREEN " / \\ " RESET,
GREEN " / \\ " RESET,
GREEN " / \\ " RESET,
GREEN " \\ \\ " RESET,
GREEN " /\\ \\____ \\ " RESET,
GREEN " / \\____ \\ \\ " RESET,
GREEN " / / \\ \\ " RESET,
GREEN " / / \\ ___\\ " RESET,
GREEN " / / \\ / ____ " RESET,
GREEN " / / \\/ / \\ " RESET,
GREEN " / / __________/ \\ " RESET,
GREEN " / \\ \\ \\ " RESET,
GREEN " / \\ \\ \\ " RESET,
GREEN " / / / \\ " RESET,
GREEN "/___________/ /____________________\\ " RESET,
GREEN " " RESET
};

ファイルの表示

@ -1,40 +0,0 @@
#define GREY "\e[1;30m"
#define GREEN "\e[1;32m"
#define WHITE "\e[1;37m"
#define RESET "\e[0m"
#define COLOR WHITE
#define TITLECOLOR GREEN
char *LOGO[] = {
GREEN " __.;=====;.__ " RESET,
GREEN " _.=+==++=++=+=+===;. " RESET,
GREEN " -=+++=+===+=+=+++++=_ " RESET,
GREEN " . -=:`` `--==+=++==. " RESET,
GREEN " _vi, ` --+=++++: " RESET,
GREEN " .uvnvi. _._ -==+==+. " RESET,
GREEN " .vvnvnI` .;==|==;. :|=||=|. " RESET,
GREY "+QmQQm" GREEN "pvvnv; " GREY "_yYsyQQWUUQQQm #QmQ#" GREEN ":" GREY "QQQWUV$QQm. " RESET,
GREY " -QQWQW" GREEN "pvvo" GREY "wZ?.wQQQE" GREEN "==<" GREY "!QWWQ/QWQW.QQWW" GREEN "(: " GREY "jQWQE " RESET,
GREY " -$QQQQmmU' jQQQ@" GREEN "+=<" GREY "QWQQ)mQQQ.mQQQC" GREEN "+;" GREY "jWQQ@' " RESET,
GREY " -$WQ8Y" GREEN "nI: " GREY "QWQQwgQQWV" GREEN"`" GREY "mWQQ.jQWQQgyyWW@! " RESET,
GREEN " -1vvnvv. `~+++` ++|+++ " RESET,
GREEN " +vnvnnv, `-|=== " RESET,
GREEN " +vnvnvns. . :=- " RESET,
GREEN " -Invnvvnsi..___..=sv=. ` " RESET,
GREEN " +Invnvnvnnnnnnnnvvnn;. " RESET,
GREEN " ~|Invnvnvvnvvvnnv}+` " RESET,
GREEN " -~|{*l}*|~ " RESET,
GREEN " " RESET,
GREEN " " RESET
};
char *LOGO_SMALL[] = {
GREEN " _______ " RESET,
GREEN " _ \\______ - " RESET,
GREEN "| \\ ___ \\ | " RESET,
GREEN "| | / \\ | | " RESET,
GREEN "| | \\___/ | | " RESET,
GREEN "| \\______ \\_| " RESET,
GREEN " -_______\\ " RESET
};