summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/colorschemes.md4
-rw-r--r--docs/releasing.md2
-rw-r--r--widgets/mem.go12
3 files changed, 11 insertions, 7 deletions
diff --git a/docs/colorschemes.md b/docs/colorschemes.md
index 430a372..5699432 100644
--- a/docs/colorschemes.md
+++ b/docs/colorschemes.md
@@ -1,8 +1,8 @@
# Colorschemes
-gotop ships with a few colorschemes which can be set with the `-c` flag followed by the name of one. You can find all the colorschemes in the [colorschemes folder](./colorschemes).
+gotop ships with a few colorschemes which can be set with the `-c` flag followed by the name of one. You can find all the colorschemes in the [colorschemes folder](../colorschemes).
-To make a custom colorscheme, check out the [template](./colorschemes/template.go) for instructions and then use [default.json](./colorschemes/default.json) as a starter. Then put the file at `~/.config/gotop/<name>.json` and load it with `gotop -c <name>`. Colorschemes PR's are welcome!
+To make a custom colorscheme, check out the [template](../colorschemes/template.go) for instructions and then use [default.json](../colorschemes/default.json) as a starter. Then put the file at `~/.config/gotop/<name>.json` and load it with `gotop -c <name>`. Colorschemes PR's are welcome!
To list all built-in color schemes, call:
diff --git a/docs/releasing.md b/docs/releasing.md
index 8ad4498..bffe175 100644
--- a/docs/releasing.md
+++ b/docs/releasing.md
@@ -8,7 +8,7 @@
6. Download and verify the correct version of one of the binaries
7. Finish the draft release and publish.
8. Check gotop-builder for a successful everything build; if successful, publish.
-10. Wait for the [AUR](https://github.com/xxxserxxx/gotop-linux] project to finish building.
+10. Wait for the [AUR](https://github.com/xxxserxxx/gotop-linux) project to finish building.
1. update arch (gotop-linux) and run `aurpublish gotop` and `aurpublish gotop-bin`
2. Test install `gotop` and `gotop-bin` with running & version check
11. Notify Nix
diff --git a/widgets/mem.go b/widgets/mem.go
index b994276..b6379a9 100644
--- a/widgets/mem.go
+++ b/widgets/mem.go
@@ -26,8 +26,10 @@ func NewMemWidget(updateInterval time.Duration, horizontalScale int) *MemWidget
mems := make(map[string]devices.MemoryInfo)
devices.UpdateMem(mems)
for name, mem := range mems {
- widg.Data[name] = []float64{0}
- widg.renderMemInfo(name, mem)
+ if mem.Total > 0 {
+ widg.Data[name] = []float64{0}
+ widg.renderMemInfo(name, mem)
+ }
}
go func() {
@@ -35,7 +37,9 @@ func NewMemWidget(updateInterval time.Duration, horizontalScale int) *MemWidget
widg.Lock()
devices.UpdateMem(mems)
for label, mi := range mems {
- widg.renderMemInfo(label, mi)
+ if mi.Total > 0 {
+ widg.renderMemInfo(label, mi)
+ }
}
widg.Unlock()
}
@@ -47,7 +51,7 @@ func NewMemWidget(updateInterval time.Duration, horizontalScale int) *MemWidget
func (mem *MemWidget) EnableMetric() {
mems := make(map[string]devices.MemoryInfo)
devices.UpdateMem(mems)
- for l, _ := range mems {
+ for l := range mems {
lc := l
metrics.NewGauge(makeName("memory", l), func() float64 {
if ds, ok := mem.Data[lc]; ok {