From 41e25da4ccb3121ee9d22f8e9ad48568241d897c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 16 Feb 2026 23:03:53 +0200 Subject: Add toggleable host separator lines (hotkey s) Draw 1px yellow vertical lines between hosts when monitoring multiple servers, making it easy to see where one host's bars end and the next begins. Toggled with hotkey 's', persisted via 'w' to ~/.loadbarsrc. Co-Authored-By: Claude Opus 4.6 --- internal/config/config.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'internal/config/config.go') diff --git a/internal/config/config.go b/internal/config/config.go index d53fd7f..1b4c9e1 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -28,8 +28,9 @@ type Config struct { ShowIOAvgLine bool ShowCores bool ShowMem bool - ShowNet bool - SSHOpts string + ShowNet bool + ShowSeparators bool + SSHOpts string Cluster string } @@ -106,7 +107,8 @@ 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, "showcores": true, "showmem": true, - "showavgline": true, "showioavgline": true, "shownet": true, "sshopts": true, "cluster": true, + "showavgline": true, "showioavgline": true, "shownet": true, "showseparators": true, + "sshopts": true, "cluster": true, } scanner := bufio.NewScanner(f) for scanner.Scan() { @@ -171,6 +173,8 @@ func (c *Config) set(key, val string) { c.ShowMem = parseBool(val) case "shownet": c.ShowNet = parseBool(val) + case "showseparators": + c.ShowSeparators = parseBool(val) case "sshopts": c.SSHOpts = val case "cluster": @@ -207,6 +211,7 @@ func (c *Config) writeTo(f *os.File) error { writeBool("showcores", c.ShowCores) writeBool("showmem", c.ShowMem) writeBool("shownet", c.ShowNet) + writeBool("showseparators", c.ShowSeparators) writeStr("sshopts", c.SSHOpts) writeStr("cluster", c.Cluster) return w.Flush() -- cgit v1.2.3