package main import ( "os" "path/filepath" _ "embed" ) //go:embed icon.ico var appIcon []byte func main() { relaunchInUserSession() dir := executableDir() app := newApp(LoadConfig(dir), filepath.Join(dir, ".env")) app.Run() } // executableDir returns the directory containing the running executable, // falling back to the working directory when os.Executable fails. func executableDir() string { if exe, err := os.Executable(); err == nil { return filepath.Dir(exe) } wd, _ := os.Getwd() return wd }