diff --git a/component/gauge/gauge.go b/component/gauge/gauge.go index b714ad6..6792087 100644 --- a/component/gauge/gauge.go +++ b/component/gauge/gauge.go @@ -33,7 +33,7 @@ type Gauge struct { func NewGauge(c config.GaugeConfig, palette console.Palette) *Gauge { g := Gauge{ - Block: component.NewBlock(c.Title, true, palette), + Block: component.NewBlock(c.Title, *c.Border, palette), Consumer: data.NewConsumer(), color: *c.Color, scale: *c.Scale, diff --git a/config/component.go b/config/component.go index 0300970..5c61483 100644 --- a/config/component.go +++ b/config/component.go @@ -65,6 +65,7 @@ type GaugeConfig struct { Cur Item `yaml:"cur"` Max Item `yaml:"max"` Min Item `yaml:"min"` + Border *bool `yaml:"border,omitempty"` } type SparkLineConfig struct { diff --git a/config/default.go b/config/default.go index f7d4f53..29ae131 100644 --- a/config/default.go +++ b/config/default.go @@ -89,6 +89,10 @@ func (c *Config) setDefaultValues() { p := defaultScale g.Scale = &p } + if g.Border == nil { + border := true + g.Border = &border + } cur := "cur" max := "max"