From 2c2dbc52d9e1b084e26e35ebd23fba4c13e87b88 Mon Sep 17 00:00:00 2001 From: Peter Bakkum Date: Thu, 27 Oct 2022 20:22:57 -0700 Subject: [PATCH] Make chart titles and lines bold --- charts.go | 5 +++++ go.mod | 2 +- go.sum | 4 ++-- top.go | 2 ++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/charts.go b/charts.go index 07762ae..83b7dfd 100644 --- a/charts.go +++ b/charts.go @@ -189,6 +189,7 @@ func newLoadChart(ctx context.Context, config *PoptopConfig) ([]container.Option }) title := cell.NewRichTextString(ColorWidgetTitle). + AddOpt(cell.Bold()). AddText(" CPU Load ("). SetFgColor(ColorHot1). AddText("1min"). @@ -263,6 +264,7 @@ func newCpuChart(ctx context.Context, config *PoptopConfig) ([]container.Option, }) title := cell.NewRichTextString(ColorWidgetTitle). + AddOpt(cell.Bold()). AddText(" CPU (%) ("). SetFgColor(ColorHot3). AddText("min"). @@ -342,6 +344,7 @@ func newNetChart(ctx context.Context, config *PoptopConfig) ([]container.Option, }) title := cell.NewRichTextString(ColorWidgetTitle). + AddOpt(cell.Bold()). AddText(" Network IO (KiB/s) ("). SetFgColor(ColorWrite). AddText("send"). @@ -414,6 +417,7 @@ func newDiskIOPSChart(ctx context.Context, config *PoptopConfig) ([]container.Op }) title := cell.NewRichTextString(ColorWidgetTitle). + AddOpt(cell.Bold()). AddText(" Disk IOPS ("). SetFgColor(ColorRead). AddText("read"). @@ -483,6 +487,7 @@ func newDiskIOChart(ctx context.Context, config *PoptopConfig) ([]container.Opti }) title := cell.NewRichTextString(ColorWidgetTitle). + AddOpt(cell.Bold()). AddText(" Disk IO (KiB/s) ("). SetFgColor(ColorRead). AddText("read"). diff --git a/go.mod b/go.mod index 4093a08..1da7ffb 100644 --- a/go.mod +++ b/go.mod @@ -21,4 +21,4 @@ require ( golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e // indirect ) -replace github.com/mum4k/termdash => github.com/bakks/termdash v0.17.0-forked +replace github.com/mum4k/termdash => github.com/bakks/termdash v0.17.0-forked-2 diff --git a/go.sum b/go.sum index cd272da..f4a1aa9 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/alecthomas/kong v0.6.1 h1:1kNhcFepkR+HmasQpbiKDLylIL8yh5B5y1zPp5bJimA github.com/alecthomas/kong v0.6.1/go.mod h1:JfHWDzLmbh/puW6I3V7uWenoh56YNVONW+w8eKeUr9I= github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= -github.com/bakks/termdash v0.17.0-forked h1:oj2qJu7zCdszcVROAgGhdclrHytQizNSY56trAn+BtM= -github.com/bakks/termdash v0.17.0-forked/go.mod h1:inGde56cgA4QXe1Sb3eQIJQnN5CLDsmDjzda7TnNaxg= +github.com/bakks/termdash v0.17.0-forked-2 h1:PTCKwCu3/h2uqvpUZ/pH/4JohUWDRTJzMMKFzFEFohs= +github.com/bakks/termdash v0.17.0-forked-2/go.mod h1:inGde56cgA4QXe1Sb3eQIJQnN5CLDsmDjzda7TnNaxg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/top.go b/top.go index ebcdac5..354de39 100644 --- a/top.go +++ b/top.go @@ -55,9 +55,11 @@ func newTopBoxes(ctx context.Context, config *PoptopConfig) ([]container.Option, }) cpuTitle := cell.NewRichTextString(ColorWidgetTitle). + AddOpt(cell.Bold()). AddText(" Top CPU Processes (%, pid, command) ") memTitle := cell.NewRichTextString(ColorWidgetTitle). + AddOpt(cell.Bold()). AddText(" Top Memory Processes (%, pid, command) ") cpuOpts := makeContainer(cpuTextBox, cpuTitle)