From b2155d447caf2d69db6fea4d4d47e9b4053696c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Wed, 19 Jun 2024 22:53:46 +0900 Subject: =?UTF-8?q?=E8=A7=A3=E5=83=8F=E5=BA=A6=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 4309d30..bf5b61e 100644 --- a/main.c +++ b/main.c @@ -12,6 +12,7 @@ #include "src/recording.h" #endif #include "src/packages.h" +#include "src/resolution.h" #include "src/cpu.h" #include "src/gpu.h" #include "src/memory.h" @@ -105,10 +106,12 @@ size_t logosize = 11; lc++; #if defined(__linux__) - printf("%s ", LOGO[lc]); - printf("%s%s%s"RESET, color, "Distro", ": "); - printf("%s\n", display_distro()); - lc++; + if (display_distro() != NULL) { + printf("%s ", LOGO[lc]); + printf("%s%s%s"RESET, color, "Distro", ": "); + printf("%s\n", display_distro()); + lc++; + } #endif printf("%s ", LOGO[lc]); @@ -142,6 +145,13 @@ size_t logosize = 11; printf("\n"); lc++; + if (display_resolution()) { + printf("%s ", LOGO[lc]); + printf("%s%s%s"RESET, color, "Resolution", ": "); + printf("%s\n", display_resolution()); + lc++; + } + printf("%s ", LOGO[lc]); printf("%s%s%s"RESET, color, "CPU", ": "); display_cpu(); @@ -166,13 +176,9 @@ size_t logosize = 11; } // TODO: - // * ロゴ - // * パッケージ // * libc // * シェル - // * 解像度 // * 端末 - // * GPU // * ストレージ return 0; -- cgit v1.2.3