diff options
author | Sean E. Russell <ser@ser1.net> | 2020-02-18 11:27:29 -0600 |
---|---|---|
committer | Sean E. Russell <ser@ser1.net> | 2020-02-18 11:27:29 -0600 |
commit | 8ee5950308ef08a4f2805486660c677a3dac1bd1 (patch) | |
tree | 03b49ea3644e4c90fb06678b535e13da622fb2de /layout | |
parent | 6c9e51470e6fef4282d22f419ac2deaf8435195d (diff) |
Adds a battery gauge.
Diffstat (limited to 'layout')
-rw-r--r-- | layout/layout.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/layout/layout.go b/layout/layout.go index c78bb67..5872cf2 100644 --- a/layout/layout.go +++ b/layout/layout.go @@ -170,6 +170,10 @@ func makeWidget(c gotop.Config, widRule widgetRule) interface{} { i++ } w = b + case "power": + b := widgets.NewBatteryGauge() + b.BarColor = ui.Color(c.Colorscheme.ProcCursor) + w = b default: log.Printf("Invalid widget name %s. Must be one of %v", widRule.Widget, widgetNames) return ui.NewBlock() |