tray

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package tray provides an optional Windows system-tray icon for the daemon. On non-Windows platforms Run is a no-op that simply blocks until ctx is cancelled, so callers can wire it unconditionally.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, _ Config) error

Run blocks until ctx is cancelled. The system-tray UI is Windows-only; on other platforms there is nothing to display, so Run simply waits.

Types

type Config

type Config struct {
	Tooltip string
	WebURL  string
	OnExit  func()
}

Config bundles the tray menu configuration.

WebURL is the URL the "View" menu entry should open. If empty, the View entry is omitted entirely. OnExit is invoked when the user picks the Exit menu entry; it should signal the daemon to shut down (e.g. by cancelling the daemon's context).

Jump to

Keyboard shortcuts

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