summaryrefslogtreecommitdiff
path: root/systray.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-03-19 08:38:18 +0100
committerRuben Pollan <meskio@sindominio.net>2018-03-20 10:29:26 +0100
commite7ab6ad504b0a7524766717c9b68c2ac332f07f1 (patch)
tree4745266ce68ac64daec66c7e8b8d5036119f22b5 /systray.go
parent5dd03466c628b63ce4f746997e4fb77f0f2b960f (diff)
[feat] only one systray can be in execution
Create a systray.pid file to check if another systray is in execution and only one systray is allowed to be running. - Resolves: #17
Diffstat (limited to 'systray.go')
-rw-r--r--systray.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/systray.go b/systray.go
index e76763a..d72562c 100644
--- a/systray.go
+++ b/systray.go
@@ -116,7 +116,10 @@ func (bt *bmTray) onReady() {
case <-mQuit.ClickedCh:
systray.Quit()
+ // XXX: this a hack as quit doesn't work
+ // this should be done by defer in the main function
bt.bm.Close()
+ releasePID()
log.Println("Quit now...")
os.Exit(0)