mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge branch 'betterbarcolor' of github.com:Seanstoppable/wtf into Seanstoppable-betterbarcolor
This commit is contained in:
@@ -50,8 +50,9 @@ func MakeGraph(widget *Widget) {
|
||||
barTime = barTime.Add(time.Duration(time.Minute))
|
||||
|
||||
bar := view.Bar{
|
||||
Label: barTime.Format("15:04"),
|
||||
Percent: rand.Intn(100-5) + 5,
|
||||
Label: barTime.Format("15:04"),
|
||||
Percent: rand.Intn(100-5) + 5,
|
||||
LabelColor: "red",
|
||||
}
|
||||
|
||||
stats[i] = bar
|
||||
|
||||
@@ -58,6 +58,7 @@ func MakeGraph(widget *Widget) {
|
||||
Label: fmt.Sprint(i),
|
||||
Percent: int(stat),
|
||||
ValueLabel: fmt.Sprintf("%d%%", int(stat)),
|
||||
LabelColor: "red",
|
||||
}
|
||||
|
||||
stats[i] = bar
|
||||
@@ -81,6 +82,7 @@ func MakeGraph(widget *Widget) {
|
||||
Label: "Mem",
|
||||
Percent: int(memInfo.UsedPercent),
|
||||
ValueLabel: fmt.Sprintf("%s/%s", usedMemLabel, totalMemLabel),
|
||||
LabelColor: "green",
|
||||
}
|
||||
|
||||
swapIndex := len(cpuStats) + 1
|
||||
@@ -101,6 +103,7 @@ func MakeGraph(widget *Widget) {
|
||||
Label: "Swp",
|
||||
Percent: int(swapPercent * 100),
|
||||
ValueLabel: fmt.Sprintf("%s/%s", usedSwapLabel, totalSwapLabel),
|
||||
LabelColor: "yellow",
|
||||
}
|
||||
|
||||
widget.BarGraph.BuildBars(stats[:])
|
||||
|
||||
Reference in New Issue
Block a user