From 54d2f9a92744dd19b51637e9ed757519fec5e485 Mon Sep 17 00:00:00 2001 From: murat Date: Mon, 4 May 2026 17:23:56 +0300 Subject: [PATCH] feat: colorful and bold text --- main.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/main.cpp b/main.cpp index 360faa9..9f561f3 100644 --- a/main.cpp +++ b/main.cpp @@ -48,14 +48,21 @@ std::vector getGpuIds() { } int main (int argc, const char *argv[]) { - cout << "\t\t\t--- " << getUser() << "@" << getHost() << " ---\n"; - cout << "\t\t distro:\t" << getDistro() << "\n"; - cout << "\t\t kernel:\t" << getKernel() << "\n"; - cout << "\t\t uptime:\t" << getUptime() << "\n"; - cout << "\t\t shell:\t" << getShell() << "\n"; - cout << "\t\t󰍛 CPU: \t" << getCPU() << "\n"; - cout << "\t\t GPU: \t" << getGPU() << "\n"; - cout << "\t\t RAM: \t" << getRAM() << "\n"; + const string colorRED = "\033[1;31m"; + const string colorGREEN = "\033[1;32m"; + const string colorBLUE = "\033[1;34m"; + const string colorYELLOW = "\033[1;33m"; + const string colorMAGENTA = "\033[1;35m"; + const string colorRESET = "\033[0m"; + + cout << "\t\t\t--- " << colorGREEN << getUser() << colorRESET << "@" << colorRED << getHost() << colorRESET << " ---\n"; + cout << colorGREEN << "\t\t distro:\t" << colorRESET << getDistro() << "\n"; + cout << colorMAGENTA << "\t\t kernel:\t" << colorRESET << getKernel() << "\n"; + cout << colorBLUE << "\t\t uptime:\t" << colorRESET << getUptime() << "\n"; + cout << colorMAGENTA << "\t\t shell:\t" << colorRESET << getShell() << "\n"; + cout << colorYELLOW <<"\t\t󰍛 CPU: \t" << colorRESET << getCPU() << "\n"; + cout << colorYELLOW <<"\t\t GPU: \t" << colorRESET << getGPU() << "\n"; + cout << colorRED << "\t\t RAM: \t" << colorRESET << getRAM() << "\n"; return 0; }