Help us shape the future of Go! Take the 2026 Go Developer Survey

desktop

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package desktop holds the process-level helpers of `pando desktop` that do not depend on the UI toolkit: the working directory of a GUI launch, the login-shell PATH import for apps opened from Finder, and spawning a separate desktop instance for another project folder.

Index

Constants

View Source
const LaunchedFromAppEnv = "PANDO_LAUNCHED_FROM_APP"

LaunchedFromAppEnv is set by the macOS Pando.app bundle launcher so the CLI knows it was opened from Finder/Dock/Launchpad rather than a terminal.

Variables

This section is empty.

Functions

func DefaultWorkingDir added in v1.2.4

func DefaultWorkingDir() (string, error)

DefaultWorkingDir returns the directory `pando desktop` works in when no --cwd flag is given. A GUI launch starts with the filesystem root as its working directory, which is read-only on macOS and never a sensible workspace, so it falls back to the user's home directory (Pando's general, project-less workspace).

func ImportLoginShellPath added in v1.2.4

func ImportLoginShellPath()

ImportLoginShellPath prepends the PATH of the user's login shell to the process PATH. Apps opened from Finder inherit launchd's minimal PATH (/usr/bin:/bin:/usr/sbin:/sbin), which hides Homebrew, language toolchains, LSP servers and agent CLIs that the tools and delegated agents rely on. It is a no-op off macOS or when the process was started from a terminal.

func LaunchedFromApp added in v1.2.4

func LaunchedFromApp() bool

LaunchedFromApp reports whether this process was started by a GUI launcher (the Pando.app bundle) instead of a terminal. Older bundles do not set LaunchedFromAppEnv, so on macOS a process re-parented to launchd (PPID 1) is treated the same way: that is how LaunchServices starts app executables.

func SpawnInstance added in v1.2.4

func SpawnInstance(dir string) error

SpawnInstance starts an independent `pando desktop` process working in dir. The child runs its own API server and window, in its own process group, so closing the window that spawned it does not take it down.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL