From 601eef459039f8005e36198a1ceb8414cba14041 Mon Sep 17 00:00:00 2001 From: exhq Date: Mon, 11 Mar 2024 10:57:32 +0330 Subject: [PATCH] NOT. EVEN. MORTAL --- data/data.go | 15 ++++++++------- main.go | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/data/data.go b/data/data.go index 2fb101d..c219466 100644 --- a/data/data.go +++ b/data/data.go @@ -143,13 +143,14 @@ func FormatTime(seconds int) string { hourRemaining := strconv.Itoa(hour % 24) return day + "d " + hourRemaining + "h " + minutesRemaining + "m " + secondsRemaining + "s" } -func GetCPU() { - mem, _ := os.Open("/proc/cpuinfo") - memInfo := make([]byte, 1024) - mem.Read(memInfo) - mem.Close() - print(memInfo) -} + +// func GetCPU() { +// mem, _ := os.Open("/proc/cpuinfo") +// memInfo := make([]byte, 1024) +// mem.Read(memInfo) +// mem.Close() +// return (memInfo) +// } func GetTerminal() string { a, existprgm := os.LookupEnv("TERM_PROGRAM") if !existprgm { diff --git a/main.go b/main.go index 1e3b302..92ef23b 100644 --- a/main.go +++ b/main.go @@ -77,8 +77,8 @@ func handlePrint(action, format string, rest string) { return data.FormatTime(no) }, "hostname": func() string { return data.Unamebs("-n") }, - "kernelname": func() string { return data.Unamebs("-s") }, - "CPU": data.GetGPU, + "kernelname": func() string { return data.Unamebs("-srm") }, + //"CPU": data.GetCPU, "GPU": data.GetGPU, "shell": func() string { return getShellVersion(data.GetShell()) }, "terminal": data.GetTerminal,