tray

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 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()
	OnReload 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). OnReload is invoked when the user picks the "Reload config" menu entry; if nil, the entry is omitted. Windows never delivers SIGHUP, so this is the reload affordance for dotvaultw (and the console daemon) — the daemon wires it to the same token re-read + config-refresh pass its SIGHUP handler runs elsewhere.

Jump to

Keyboard shortcuts

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