simplify the driver interface

This commit is contained in:
alu
2026-08-07 09:29:17 -07:00
parent b99bb45877
commit 31c409a94c
13 changed files with 181 additions and 197 deletions
+5 -5
View File
@@ -2,7 +2,7 @@ package app
import (
"finally-a-monolithic-linux-hw-monitor/app/mem"
proc "finally-a-monolithic-linux-hw-monitor/app/proc"
"finally-a-monolithic-linux-hw-monitor/app/proc"
"fmt"
"os"
"os/signal"
@@ -25,8 +25,8 @@ func Run() {
os.Exit(0)
}()
p, _ := proc.GetProc()
m, _ := mem.GetMem()
proc, _ := proc.GetProc()
mem, _ := mem.GetMem()
ticker := time.NewTicker(1 * time.Second)
defer ticker.Stop()
@@ -35,8 +35,8 @@ func Run() {
// Move cursor to top-left (0,0) without clearing full buffer (flicker-free)
fmt.Fprint(console, "\033[H")
proc.RenderProc(console, &p)
mem.RenderMem(console, &m)
proc.RenderProc(console)
mem.Render(console)
fmt.Fprint(console, "\nPress Ctrl+C to exit.\033[K\n")
fmt.Print(console.String())