From 542c7cbc3f8b7658905b85e10ff47ea216b44f7e Mon Sep 17 00:00:00 2001 From: nullday Date: Fri, 12 Aug 2022 16:38:51 +0800 Subject: [PATCH] Fix the color display in wezterm (#767) Fix color in wezterm Signed-off-by: nullday Signed-off-by: nullday --- pkg/metrics/widget.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/metrics/widget.go b/pkg/metrics/widget.go index c27e8b138..f273f2b9c 100644 --- a/pkg/metrics/widget.go +++ b/pkg/metrics/widget.go @@ -69,6 +69,7 @@ func NewNameCol(name string) *WidgetCol { w := widgets.NewParagraph() w.Text = name w.Border = false + w.TextStyle.Fg = ui.ColorClear return &WidgetCol{ widget: w, Height: defaultRowHeight, @@ -86,6 +87,7 @@ func NewCPUCol(metChan <-chan Metrics) *WidgetCol { val := ms.CPUUtil w.BarColor = colorScale(val) w.Label = fmt.Sprintf("%d%%", val) + w.LabelStyle.Fg = ui.ColorClear if val > 100 { val = 100 } @@ -108,6 +110,7 @@ func NewMEMCol(metChan <-chan Metrics) *WidgetCol { ms := <-metChan mPercent := ms.MemPercent w.BarColor = colorScale(mPercent) + w.LabelStyle.Fg = ui.ColorClear w.Label = fmt.Sprintf("%s / %s", cwidgets.ByteFormat64Short(ms.MemUsage), cwidgets.ByteFormat64Short(ms.MemLimit)) w.Percent = mPercent }