summaryrefslogtreecommitdiff
path: root/standalone.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-07-09 23:34:14 +0200
committerRuben Pollan <meskio@sindominio.net>2018-07-10 13:03:30 +0200
commitfa08af4697c14c5a365ed7ec2b2dce3f67386d49 (patch)
tree2ae1eb50401b3a2b2104444275cabdd31f4d3619 /standalone.go
parent2ac0be0c3f431bdefe99b29ab83f3b3c8bd9ea78 (diff)
[feat] autostart the standalone systray if the vpn was on
- Resolves: #8
Diffstat (limited to 'standalone.go')
-rw-r--r--standalone.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/standalone.go b/standalone.go
index cda78f8..a9f135d 100644
--- a/standalone.go
+++ b/standalone.go
@@ -17,10 +17,22 @@
package main
import (
+ "os"
+
"0xacab.org/leap/bitmask-systray/bitmask"
standalone "0xacab.org/leap/bitmask-systray/standalone"
+ pmautostart "github.com/ProtonMail/go-autostart"
)
func initBitmask() (bitmask.Bitmask, error) {
return standalone.Init()
}
+
+func newAutostart(appName string, iconPath string) autostart {
+ return &pmautostart.App{
+ Name: appName,
+ Exec: os.Args,
+ DisplayName: appName,
+ Icon: iconPath,
+ }
+}