From 4a766282cf3658ed25c938e06f4cad00564e8d42 Mon Sep 17 00:00:00 2001 From: Aofei Sheng Date: Tue, 21 Jul 2020 18:49:51 +0800 Subject: Align CPU values in CPU widget --- widgets/cpu.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/cpu.go b/widgets/cpu.go index d8d9a50..1a7204e 100644 --- a/widgets/cpu.go +++ b/widgets/cpu.go @@ -120,7 +120,7 @@ func (cpu *CPUWidget) update() { defer cpu.updateLock.Unlock() for key, percent := range cpus { cpu.Data[key] = append(cpu.Data[key], float64(percent)) - cpu.Labels[key] = fmt.Sprintf("%d%%", percent) + cpu.Labels[key] = fmt.Sprintf("%3d%%", percent) cpu.cpuLoads[key] = float64(percent) } }() -- cgit v1.2.3