Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HelperPath ¶ added in v1.29.0
func HelperPath() string
HelperPath returns the lerd-tray binary installed alongside lerd, or "" when the running executable can't be located.
func MissingLibs ¶ added in v1.29.0
MissingLibs returns the shared libraries the tray helper links that this host cannot resolve. lerd-tray needs libayatana-appindicator, which an immutable image cannot simply install: without the library the helper exits 127 on every start, so the unit is left restart-looping and the whole systemd user session reports "degraded". Detection is conservative — anything it cannot determine (unreadable binary, no ELF, no library index) reports nothing missing, so a working tray is never disabled by a failed probe.
func Run ¶
Run starts the system tray applet. Unless already running as a daemon (or under launchd), it re-execs itself detached from the terminal and returns immediately so the shell prompt is restored. When launched by launchd, XPC_SERVICE_NAME is set and we run foreground directly — launchd owns the process lifecycle.
Types ¶
type Snapshot ¶
type Snapshot struct {
Running bool
NginxRunning bool
DNSOK bool
DNSDegraded bool // lerd-dns healthy but the system resolver is bypassed, typically a VPN
DNSDisabled bool // explicit dns.enabled=false from API; zero value falls through to ok/error
PHPVersions []phpInfo
PHPDefault string
Services []serviceInfo
AutostartEnabled bool
LANExposed bool // lerd lan expose state — drives the LAN toggle item
DumpsEnabled bool // lerd dump on/off state — drives the dump toggle item
NotificationsEnabled bool // lerd notify on/off state — drives the notifications toggle item
HighContrastIcon bool // lerd tray icon high-contrast state — green running icon on any panel
LatestVersion string // non-empty (e.g. "v0.8.5") when a newer version is available
}
Snapshot holds the state polled from the Lerd API.