Documentation
¶
Overview ¶
Package launcher is the launcher surface (crates/lys-shell/src/ shell/launcher): a layer-shell overlay per `lys-shell launcher` session, hosting the service/launcher engine. Sessions arrive over the launcher socket; the engine runs on its own goroutine and this package only renders and forwards input.
Index ¶
Constants ¶
const VaultModeName = "vault"
VaultModeName is the vault mode's name, which Deps.Vault builds.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
// Invoke runs fn on the UI loop (app.Invoke).
Invoke func(fn func())
// After runs fn on the UI loop after d; the returned stop cancels.
After func(d time.Duration, fn func()) (stop func())
// Config is the live config.
Config func() *config.Config
// Open maps the layer surface for one session.
Open func(cfg app.LayerConfig) (Window, error)
// Font paints every label; Variants gives the message line and
// markup rows their bold and italic faces.
Font render.Font
Variants widget.VariantFunc
// Sheet is the shell's stylesheet (the .launcher-* rules), and
// SheetPriority its priority, which a session's -font/-style CSS
// sits above.
Sheet *widget.Stylesheet
SheetPriority int
// MonitorWidth is the width a percent -width resolves against (the
// compositor picks the output, so the first one stands in, as the
// Rust surface's fallback does before it is realized).
MonitorWidth func() int
// Clipboard is the history the clipboard mode reads (nil: none).
Clipboard modes.ClipboardHistory
// Vault builds the vault mode for a session (nil: no vault mode).
Vault func() engine.Mode
// Copy puts calc's result on the clipboard.
Copy func(text string)
// OpenHistory opens the launch history (a test seam).
OpenHistory func() (*engine.History, error)
// FireHook runs a -on-* hook (engine.FireHook; a test seam).
FireHook func(command string, ctx engine.HookContext)
}
Deps are what the shell hands the surface.
type Surface ¶
type Surface struct {
// contains filtered or unexported fields
}
Surface is the launcher (shell/launcher/mod.rs): it serves the launcher socket's sessions on the UI loop.
func (*Surface) ClientGone ¶
ClientGone implements launcheripc.Handler: a CLI that went away ends its session if it is still the live one, and its connection is released either way.
func (*Surface) Open ¶
func (s *Surface) Open(sess *launcheripc.Session)
Open implements launcheripc.Handler: the session moves onto the loop.