summaryrefslogtreecommitdiff
path: root/pkg/systray/run.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/systray/run.go')
-rw-r--r--pkg/systray/run.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/systray/run.go b/pkg/systray/run.go
index 6521da6..5764b36 100644
--- a/pkg/systray/run.go
+++ b/pkg/systray/run.go
@@ -27,8 +27,13 @@ func Run(conf *Config) {
bt := bmTray{conf: conf, waitCh: make(chan bool)}
finishedCh := make(chan bool)
go initialize(conf, &bt, finishedCh)
+ go func() {
+ <-finishedCh
+ /* in osx, systray.Quit() halts the program */
+ bt.quit()
+ os.Exit(0)
+ }()
bt.start()
- <-finishedCh
}
func initialize(conf *Config, bt *bmTray, finishedCh chan bool) {