Skip to content
Permalink
Browse files

Cleanup widget initialization

  • Loading branch information...
cjbassi committed Apr 13, 2018
1 parent 3043e6b commit b5604e62797fa0019a800154c79072d42b4e4cb1
Showing with 2 additions and 3 deletions.
  1. +2 −3 main.go
@@ -23,9 +23,7 @@ var (
helpToggled = make(chan bool, 1)
helpVisible = false

// proc widget takes longer to load, wait to render until it loads data
widgetsLoaded = make(chan bool, 1)
wg sync.WaitGroup
wg sync.WaitGroup
// used to render the proc widget whenever a key is pressed for it
keyPressed = make(chan bool, 1)
// used to render cpu and mem when zoom has changed
@@ -191,6 +189,7 @@ func widgetColors() {
}
}

// load widgets asynchronously but wait till they are all finished
func initWidgets() {
wg.Add(widgetCount)

0 comments on commit b5604e6

Please sign in to comment.
You can’t perform that action at this time.