tray

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg *config.Config, onOpenExample func(), onOpenBackups func(), onQuit func(), updateCh <-chan UpdateInfo, trusted *TrustedFolderHooks)

Types

type Row added in v1.3.0

type Row struct {
	Path  string
	Label string
}

Row is one entry in a list submenu. Label is what the user sees, Path is what the hook is called with. They are carried separately because they differ: a folder that is missing or whose identity no longer matches is labelled as such. Recovering the path by stripping that marker off the label was the old protocol, and it broke for anyone who named a folder to end in the marker.

type Tray

type Tray struct {
	// contains filtered or unexported fields
}

type TrustedFolderHooks added in v1.2.0

type TrustedFolderHooks struct {
	List   func() []Row
	Add    func() []Row
	Remove func(path string) []Row
}

TrustedFolderHooks are the app operations the Trusted Folders submenu drives. Each returns the authoritative list so the tray always re-renders from truth rather than tracking state itself. Add pops the native folder picker and trusts the choice; Remove untrusts one (asking first, app-side, because it closes a live origin); List is the initial render and the poll.

type UpdateInfo

type UpdateInfo struct {
	Version string
	URL     string
}

Jump to

Keyboard shortcuts

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