From 4973bc83ff02f4acaaca73dd54e7f7ea03557c64 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Tue, 24 Nov 2020 00:51:09 +0200 Subject: [PATCH] cpu color: make threshold upper: > 70% warn and > 90% is danger --- cwidgets/compact/gauge.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cwidgets/compact/gauge.go b/cwidgets/compact/gauge.go index 971eb28..39fccdc 100644 --- a/cwidgets/compact/gauge.go +++ b/cwidgets/compact/gauge.go @@ -100,10 +100,10 @@ func (w *GaugeCol) UnHighlight() { } func colorScale(n int) ui.Attribute { - if n <= 30 { + if n <= 70 { return ui.ThemeAttr("status.ok") } - if n <= 70 { + if n <= 90 { return ui.ThemeAttr("status.warn") } return ui.ThemeAttr("status.danger")