tray

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package tray puts cuxdeck in the menu bar: the mascot icon, and a menu to open the panel, copy a pairing link, toggle start-at-login, and quit. It's the "it's a real app, not a terminal command" layer.

systray owns the main thread, so Run blocks; the daemon runs in the callback. Everything the menu needs from the daemon comes through the Deps struct, so this package stays free of the server/service code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(d Deps, daemon func())

Run shows the menu-bar icon and blocks until Quit. daemon is started once the tray is ready (systray must own the main goroutine).

Types

type Deps

type Deps struct {
	// CurrentURL returns the address to open — the tunnel URL if up,
	// else the local one.
	CurrentURL func() string
	// PairingLink mints a fresh single-use pairing link to share.
	PairingLink func() string
	// StartAtLoginState / SetStartAtLogin read and flip the OS
	// start-at-login registration.
	StartAtLoginState func() bool
	SetStartAtLogin   func(on bool) error
	// OnQuit runs before the process exits (graceful shutdown).
	OnQuit func()
}

Deps is what the menu needs from the rest of the app.

Jump to

Keyboard shortcuts

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