diff options
author | 諏訪子 <suwako@076.moe> | 2024-06-18 15:25:34 +0900 |
---|---|---|
committer | 諏訪子 <suwako@076.moe> | 2024-06-18 15:25:34 +0900 |
commit | 0a0916ccebae20e7ee6feafa417cfebd8256ef04 (patch) | |
tree | 597c44e2fa4761dbf01039e222408e185aea2483 /main.c | |
parent | cfc9d105e6b808922a5dc8c357225a9fba1236e2 (diff) |
ロゴ
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 49 |
1 files changed, 44 insertions, 5 deletions
@@ -19,12 +19,39 @@ const char *sofname = "farfetch"; const char *version = "0.0.1"; int main() { +#if defined(__OpenBSD__) +#include "src/logo/openbsd.h" +#else +#define COLOR "\e[1;30m" +#define RESET "\e[0m" + char *LOGO[] = { +" ⢀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⣠⠾⠛⠶⣄⢀⣠⣤⠴⢦⡀⠀⠀⠀⠀", +"⠀⠀⠀⢠⡿⠉⠉⠉⠛⠶⠶⠖⠒⠒⣾⠋⠀⢀⣀⣙⣯⡁⠀⠀⠀⣿⠀⠀⠀⠀", +"⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⢸⡏⠀⠀⢯⣼⠋⠉⠙⢶⠞⠛⠻⣆⠀⠀⠀", +"⠀⠀⠀⢸⣧⠆⠀⠀⠀⠀⠀⠀⠀⠀⠻⣦⣤⡤⢿⡀⠀⢀⣼⣷⠀⠀⣽⠀⠀⠀", +"⠀⠀⠀⣼⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⢏⡉⠁⣠⡾⣇⠀⠀⠀", +"⠀⠀⢰⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠋⠉⠀⢻⡀⠀⠀", +"⣀⣠⣼⣧⣤⠀⠀⠀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡀⠀⠀⠐⠖⢻⡟⠓⠒", +"⠀⠀⠈⣷⣀⡀⠀⠘⠿⠇⠀⠀⠀⢀⣀⣀⠀⠀⠀⠀⠿⠟⠀⠀⠀⠲⣾⠦⢤⠀", +"⠀⠀⠋⠙⣧⣀⡀⠀⠀⠀⠀⠀⠀⠘⠦⠼⠃⠀⠀⠀⠀⠀⠀⠀⢤⣼⣏⠀⠀⠀", +"⠀⠀⢀⠴⠚⠻⢧⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⠞⠉⠉⠓⠀⠀", +"⠀⠀⠀⠀⠀⠀⠀⠈⠉⠛⠛⠶⠶⠶⣶⣤⣴⡶⠶⠶⠟⠛⠉⠀⠀⠀⠀⠀⠀⠀" + }; +#endif + + printf("%s ", LOGO[0]); + printf(COLOR); display_user_name(); + printf(RESET); printf("@"); + printf(COLOR); display_user_host(); + printf(RESET); + printf("%s ", LOGO[1]); printf("------------------\n"); - printf("OS: "); + printf("%s ", LOGO[2]); + printf(COLOR"%s%s"RESET, "OS", ": "); display_os_name(); printf(" "); display_os_vers(); @@ -33,37 +60,49 @@ int main() { printf("\n"); #if defined(__linux__) - printf("Distro: "); + printf(COLOR"%s%s"RESET, "Distro", ": "); display_distro(); printf("\n"); #endif + printf("%s ", LOGO[3]); + printf(COLOR"%s%s"RESET, "Host", ": "); printf("Host: "); display_host_model(); printf("\n"); - printf("Uptime: "); + printf("%s ", LOGO[4]); + printf(COLOR"%s%s"RESET, "Uptime", ": "); display_days(); printf(", "); display_time(); printf("\n"); #if defined(__OpenBSD__) - printf("Recording: audio = "); + printf("%s ", LOGO[5]); + printf(COLOR"%s%s"RESET, "Recording", ": "); + printf("audio = "); display_recording_audio(); printf(", video = "); display_recording_video(); printf("\n"); #endif - printf("CPU: "); + printf("%s ", LOGO[6]); + printf(COLOR"%s%s"RESET, "CPU", ": "); display_cpu(); printf("\n"); + printf("%s ", LOGO[7]); + printf(COLOR"%s%s"RESET, "Memory", ": "); printf("Memory: "); display_memory(); printf("\n"); + for (size_t i = 8; i < sizeof(LOGO) / sizeof(LOGO[0]); i++) { + printf("%s\n", LOGO[i]); + } + // TODO: // * ロゴ // * パッケージ |