Documentation
¶
Overview ¶
Package shellipc is the shell's own session-bus surface: the dev.stubbe.lys.Shell1 control interface (wayle-shell-core's shell_ipc: bar visibility per monitor, the lock and VPN sign-in hooks) and the GApplication identity dev.stubbe.lys.shell with its org.gtk.Actions (quit, inspector), which `lys-shell panel` and single-instance checks use.
Index ¶
- Constants
- func IsRunning(conn *dbus.Conn) (bool, error)
- func Lock(ctx context.Context, conn *dbus.Conn) error
- func LockCommand(ctx context.Context, conn *dbus.Conn, connErr error, stdout io.Writer) error
- func Serve(conn *dbus.Conn, state *State, hooks Hooks) (func(), error)
- func ServeApplication(conn *dbus.Conn, run Actions) (func(), error)
- func VPNSSOCallback(ctx context.Context, conn *dbus.Conn, uri string) error
- type Actions
- type Hooks
- type State
Constants ¶
const ( AppID = "dev.stubbe.lys.shell" AppPath = dbus.ObjectPath("/dev/stubbe/lys/shell") ActionsIface = "org.gtk.Actions" ActionQuit = "quit" ActionInspect = "inspector" )
The shell's application identity: the name and the org.gtk.Actions object a GtkApplication exports through GIO, so `lys-shell panel` and gapplication(1) reach the shell the same way.
const ( ServiceName = "dev.stubbe.lys.Shell1" ServicePath = dbus.ObjectPath("/dev/stubbe/lys/Shell") )
dev.stubbe.lys.Shell1 (wayle-ipc/src/shell_ipc.rs).
Variables ¶
This section is empty.
Functions ¶
func IsRunning ¶
IsRunning is bootstrap.rs's is_already_running / the CLI's is_running: whether a shell owns the application id.
func LockCommand ¶
LockCommand is `lys-shell lock` and the lys-lock binary (lys-shell/src/cli/lock.rs): lock through the running shell and print "Session locked"; the errors carry the Rust CLI's wording. connErr is the session-bus dial's error.
func ServeApplication ¶
ServeApplication takes the application id and exports run as its actions. A shell already holding the id is an error.
Types ¶
type Actions ¶
type Actions struct {
Quit func()
Inspect func()
}
Actions is what the two stateless actions run: Quit ends the shell, Inspect opens lys-ui's inspector.
type Hooks ¶
type Hooks struct {
// Lock shows the lock screen; false means it is not ready.
Lock func() bool
// VPNSSOCallback hands a browser callback to a waiting sign-in;
// false means none is waiting.
VPNSSOCallback func(uri string) bool
}
Hooks are the actions other parts of the shell provide. A nil hook answers as the Rust shell does before its component exists.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State is ShellIpcState: the connectors that have a bar and the hidden subset. Changes reach OnHidden with the new hidden set.
func NewState ¶
NewState builds an empty state; onHidden (may be nil) observes every change of the hidden set.
func (*State) SetConnectors ¶
SetConnectors is monitors.rs's sync_ipc_state: the bars that exist, with hidden entries for vanished connectors dropped.