summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/main.go b/main.go
index e40c6e8..ce6d446 100644
--- a/main.go
+++ b/main.go
@@ -10,6 +10,7 @@ import (
"time"
"go.wit.com/dev/alexflint/arg"
+ "go.wit.com/gui"
pb "go.wit.com/lib/protobuf/virtbuf"
"go.wit.com/lib/virtigolib"
"go.wit.com/log"
@@ -21,12 +22,8 @@ var Version string
var resources embed.FS
func main() {
- if os.Getenv("VIRTIGO_HOME") == "" {
- homeDir, _ := os.UserHomeDir()
- fullpath := filepath.Join(homeDir, ".config/virtigo")
- os.Setenv("VIRTIGO_HOME", fullpath)
- }
var pp *arg.Parser
+ gui.InitArg()
pp = arg.MustParse(&argv)
if pp == nil {
@@ -34,9 +31,11 @@ func main() {
os.Exit(0)
}
- // if argv.Daemon {
- // log.DaemonMode(true)
- // }
+ if os.Getenv("VIRTIGO_HOME") == "" {
+ homeDir, _ := os.UserHomeDir()
+ fullpath := filepath.Join(homeDir, ".config/virtigo")
+ os.Setenv("VIRTIGO_HOME", fullpath)
+ }
// set defaults
me.unstable = time.Now() // initialize the grid as unstable
@@ -176,5 +175,6 @@ func main() {
}
// sit here
- startHTTP()
+ go startHTTP()
+ doGui()
}