diff --git a/wtf.go b/wtf.go index dc681155..a1368c59 100644 --- a/wtf.go +++ b/wtf.go @@ -172,6 +172,8 @@ func addWidget(app *tview.Application, pages *tview.Pages, widgetName string) { switch widgetName { case "bamboohr": Widgets = append(Widgets, bamboohr.NewWidget()) + case "bargraph": + Widgets = append(Widgets, bargraph.NewWidget()) case "bittrex": Widgets = append(Widgets, bittrex.NewWidget()) case "clocks": @@ -223,7 +225,7 @@ func makeWidgets(app *tview.Application, pages *tview.Pages) { // Always in alphabetical order bamboohr.Config = Config - bargraph.Config = Config + bargraph.Config = Config bittrex.Config = Config clocks.Config = Config cmdrunner.Config = Config diff --git a/wtf/bargraph.go b/wtf/bargraph.go index 7c7da2ac..977f526f 100644 --- a/wtf/bargraph.go +++ b/wtf/bargraph.go @@ -54,6 +54,10 @@ func (widget *BarGraph) BorderColor() string { return Config.UString("wtf.colors.border.normal", "gray") } +func (widget *BarGraph) Disable() { + widget.enabled = false +} + func (widget *BarGraph) Disabled() bool { return !widget.Enabled() } diff --git a/wtf/text_widget.go b/wtf/text_widget.go index b62868ef..c1bef129 100644 --- a/wtf/text_widget.go +++ b/wtf/text_widget.go @@ -53,6 +53,10 @@ func (widget *TextWidget) BorderColor() string { return Config.UString("wtf.colors.border.normal", "gray") } +func (widget *TextWidget) Disable() { + widget.enabled = false +} + func (widget *TextWidget) Disabled() bool { return !widget.Enabled() } @@ -61,10 +65,6 @@ func (widget *TextWidget) Enabled() bool { return widget.enabled } -func (widget *TextWidget) Disable() { - widget.enabled = false -} - func (widget *TextWidget) Focusable() bool { return widget.enabled && widget.focusable }