summaryrefslogtreecommitdiff
path: root/status/02-cpu.go
diff options
context:
space:
mode:
Diffstat (limited to 'status/02-cpu.go')
-rw-r--r--status/02-cpu.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/status/02-cpu.go b/status/02-cpu.go
index 34379fb..e00d74f 100644
--- a/status/02-cpu.go
+++ b/status/02-cpu.go
@@ -5,8 +5,6 @@ import (
"errors"
"strings"
- "hhvn.uk/hbspbar/drw"
- "hhvn.uk/hbspbar/config"
"hhvn.uk/hbspbar/common"
)
@@ -104,15 +102,7 @@ func cpu(name string) error {
ltotal = ltotal - total[i]
used := int((100 * (ltotal - lidle)) / ltotal)
- tbpad := 3
- th := int(config.H) - tbpad * 2 + 1
- h := int(th * used / 100)
- fg := blendGYR(used)
- bg := drw.Blend(fg, config.Status, 75)
-
- u.drawRect(cx, tbpad - 1, 3, th, bg, true)
- u.drawRect(cx, tbpad + th - h - 1, 3, h, fg, true)
- cx += 5
+ cx += u.drawPercentBar(cx, used)
}
temps := 0