diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-18 09:19:03 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-18 09:19:03 +0200 |
| commit | d845cf3208c3bbdb7e3dd3041d1ae491b88d4d21 (patch) | |
| tree | 5fa93b7787a1f1c9598aecfc772ede6dbac17f8d /internal/config/config.go | |
| parent | 88f4e239a7521112a4db8c7842e3a05db4446cd4 (diff) | |
feat: add load average bar visualization (4/l hotkey)0.12.0
Adds a new teal bar type showing /proc/loadavg data per host.
The 1-min average fills from the top downward; yellow and white
1px reference lines mark the 5-min and 15-min averages. A global
loadPeak tracker (floor 2.0, slow per-frame decay) keeps the scale
meaningful across hosts and after spikes. Toggle with 4 or l;
persisted to ~/.loadbarsrc as showload=1.
Bump version to 0.12.0.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/config/config.go')
| -rw-r--r-- | internal/config/config.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 90b8192..99e9c6d 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -29,6 +29,7 @@ type Config struct { CPUMode int // constants.CPUModeAverage / CPUModeCores / CPUModeOff ShowMem bool ShowNet bool + ShowLoad bool ShowSeparators bool MaxBarsPerRow int SSHOpts string @@ -109,7 +110,7 @@ func (c *Config) parseReader(f *os.File) error { "title": true, "barwidth": true, "cpuaverage": true, "extended": true, "hasagent": true, "height": true, "maxwidth": true, "netaverage": true, "netlink": true, "cpumode": true, "showcores": true, "showmem": true, - "showavgline": true, "showioavgline": true, "shownet": true, "showseparators": true, + "showavgline": true, "showioavgline": true, "shownet": true, "showload": true, "showseparators": true, "maxbarsperrow": true, "sshopts": true, "cluster": true, } scanner := bufio.NewScanner(f) @@ -185,6 +186,8 @@ func (c *Config) set(key, val string) { c.ShowMem = parseBool(val) case "shownet": c.ShowNet = parseBool(val) + case "showload": + c.ShowLoad = parseBool(val) case "showseparators": c.ShowSeparators = parseBool(val) case "maxbarsperrow": @@ -222,6 +225,7 @@ func (c *Config) writeTo(f *os.File) error { writeInt("cpumode", c.CPUMode) writeBool("showmem", c.ShowMem) writeBool("shownet", c.ShowNet) + writeBool("showload", c.ShowLoad) writeBool("showseparators", c.ShowSeparators) writeInt("maxbarsperrow", c.MaxBarsPerRow) writeStr("sshopts", c.SSHOpts) |
