tray

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tray provides system tray support for BubbleFish Nexus.

On Windows, a system tray icon is displayed with menu items for status, opening the web dashboard, and stopping the daemon.

On headless Linux ($DISPLAY is empty), the tray is gracefully skipped with an INFO log — it is NOT an error.

Reference: Tech Spec Section 2.1 — headless skip, Section 13.1 — start.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Quit

func Quit()

Quit signals the tray to exit. Safe to call multiple times (sync.Once).

func QuitCh

func QuitCh() <-chan struct{}

QuitCh returns a channel that is closed when Quit() is called.

func Run

func Run(cfg Config)

Run on non-Windows platforms checks for a display server. If $DISPLAY is empty (headless Linux), the tray is gracefully skipped with an INFO log — this is NOT an error.

On macOS with a display, the tray logs availability and blocks until quit.

Reference: Tech Spec Section 2.1 — "Headless Linux: tray gracefully skipped when $DISPLAY is empty (log INFO, not error)."

Types

type Config

type Config struct {
	DaemonPort    int
	DashboardPort int
	Logger        *slog.Logger
	OnStop        func() // Called when user clicks "Stop Daemon" in tray.
}

Config holds the settings for the system tray.

Jump to

Keyboard shortcuts

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