diff --git a/cwidgets/compact/setters.go b/cwidgets/compact/setters.go index e23a383..638db34 100644 --- a/cwidgets/compact/setters.go +++ b/cwidgets/compact/setters.go @@ -30,6 +30,9 @@ func (row *Compact) SetCPU(val int) { val = 5 row.Cpu.BarColor = ui.ThemeAttr("gauge.bar.bg") } + if val > 100 { + val = 100 + } row.Cpu.Percent = val }