Documentation
¶
Overview ¶
Package desktop talks to the desktop the server runs on (when it has one): opening the web app in the default browser and showing the system's own folder picker during setup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrCancelled means the viewer closed the folder picker without choosing. ErrCancelled = errors.New("cancelled") // container, SSH session, no picker tool installed). ErrUnavailable = errors.New("no desktop folder picker available") )
Functions ¶
func Ask ¶
Ask shows a question in the system's own dialog and returns the index of the button chosen, or -1 when it was closed or Escape was pressed. The first button is the default (Enter). ErrUnavailable means there's no desktop, or no way to show one.
Tests never call it: it opens a real window on someone's screen.
func Headless ¶
func Headless() bool
Headless reports whether this process has no interactive desktop: running as a service, in a container, over SSH without a display, or told so with WMS_NO_BROWSER=1.
func OpenFolder ¶
OpenFolder shows a folder in the system's file manager.
Types ¶
This section is empty.