26 lines
562 B
Go
26 lines
562 B
Go
//go:build !nogui
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/yetone/magpie/internal/gui"
|
|
"github.com/yetone/magpie/internal/proc"
|
|
)
|
|
|
|
const hasGUI = true
|
|
|
|
// the desktop app may have been opened from the Finder, with none of the
|
|
// PATH a terminal has
|
|
func runGUI(showMain bool, link string) error {
|
|
proc.UserPath()
|
|
return gui.Run(version, showMain, link)
|
|
}
|
|
|
|
// runPanel starts the app with its quick panel open, or toggles the panel
|
|
// of the one already running.
|
|
func runPanel() error {
|
|
proc.UserPath()
|
|
gui.OpenPanel = true
|
|
return gui.Run(version, false, "")
|
|
}
|