desktop

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package desktop owns the desktop shell lifecycle. It does not scan machines or launch agents; the GUI service supplies the shared session state and commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Effective

func Effective(d config.Desktop, c Capabilities) string

func KeepOnClose

func KeepOnClose(d config.Desktop) bool

KeepOnClose is independent of icon placement. Launching Hopsesh again uses the single-instance handler to show its existing window, including without a tray.

func Validate

func Validate(d config.Desktop, c Capabilities) error

Types

type Capabilities

type Capabilities struct {
	Tray    bool   `json:"tray"`
	HideApp bool   `json:"hideApp"`
	Reason  string `json:"reason"`
}

type Controller

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

Controller is the only owner of desktop shell state. Native calls are serialized; callbacks never acquire this mutex from the UI thread.

func New

func New(app *application.App, main *application.WebviewWindow, prefs config.Desktop, privileged func(*application.WebviewWindow), open func(string), changed func()) *Controller

func (*Controller) Apply

func (c *Controller) Apply(p config.Desktop, login bool) error

func (*Controller) BackgroundLaunch

func (c *Controller) BackgroundLaunch() bool

func (*Controller) CloseQuick

func (c *Controller) CloseQuick()

func (*Controller) Foreground

func (c *Controller) Foreground() bool

func (*Controller) KeepOnClose

func (c *Controller) KeepOnClose() bool

func (*Controller) OpenMain

func (c *Controller) OpenMain()

func (*Controller) Recheck

func (c *Controller) Recheck()

func (*Controller) SetAttention

func (c *Controller) SetAttention(needs, tabs int)

func (*Controller) ShowQuick

func (c *Controller) ShowQuick()

func (*Controller) Snapshot

func (c *Controller) Snapshot() State

func (*Controller) Stop

func (c *Controller) Stop()

func (*Controller) Suspended

func (c *Controller) Suspended() bool

type State

type State struct {
	Preferences  config.Desktop `json:"preferences"`
	Capabilities Capabilities   `json:"capabilities"`
	Effective    string         `json:"effective"`
	Login        bool           `json:"login"`
	LoginError   string         `json:"loginError,omitempty"`
	Error        string         `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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