mirror of
https://github.com/taigrr/wtf
synced 2026-03-26 00:22:21 -07:00
Merge branch 'master' into master
This commit is contained in:
7
wtf.go
7
wtf.go
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/radovskyb/watcher"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/senorprogrammer/wtf/bamboohr"
|
||||
"github.com/senorprogrammer/wtf/bargraph"
|
||||
"github.com/senorprogrammer/wtf/clocks"
|
||||
"github.com/senorprogrammer/wtf/cmdrunner"
|
||||
"github.com/senorprogrammer/wtf/cryptoexchanges/bittrex"
|
||||
@@ -169,6 +170,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":
|
||||
@@ -216,6 +219,7 @@ func makeWidgets(app *tview.Application, pages *tview.Pages) {
|
||||
|
||||
// Always in alphabetical order
|
||||
bamboohr.Config = Config
|
||||
bargraph.Config = Config
|
||||
bittrex.Config = Config
|
||||
clocks.Config = Config
|
||||
cmdrunner.Config = Config
|
||||
@@ -243,6 +247,7 @@ func makeWidgets(app *tview.Application, pages *tview.Pages) {
|
||||
if enabled, _ := Config.Bool("wtf.mods." + mod + ".enabled"); enabled {
|
||||
addWidget(app, pages, mod)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FocusTracker = wtf.FocusTracker{
|
||||
@@ -295,4 +300,6 @@ func main() {
|
||||
fmt.Printf("An error occurred: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
wtf.Log("running!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user