pub enum Request {
Show 15 variants
Version,
Outputs,
Workspaces,
Windows,
Layers,
KeyboardLayouts,
FocusedOutput,
FocusedWindow,
PickWindow,
PickColor,
Action(Action),
Output {
output: String,
action: OutputAction,
},
EventStream,
ReturnError,
OverviewState,
}
Expand description
Request from client to niri.
Variants§
Version
Request the version string for the running niri instance.
Outputs
Request information about connected outputs.
Workspaces
Request information about workspaces.
Windows
Request information about open windows.
Layers
Request information about layer-shell surfaces.
KeyboardLayouts
Request information about the configured keyboard layouts.
FocusedOutput
Request information about the focused output.
FocusedWindow
Request information about the focused window.
PickWindow
Request picking a window and get its information.
PickColor
Request picking a color from the screen.
Action(Action)
Perform an action.
Output
Change output configuration temporarily.
The configuration is changed temporarily and not saved into the config file. If the output configuration subsequently changes in the config file, these temporary changes will be forgotten.
EventStream
Start continuously receiving events from the compositor.
The compositor should reply with Reply::Ok(Response::Handled)
, then continuously send
Event
s, one per line.
The event stream will always give you the full current state up-front. For example, the
first workspace-related event you will receive will be Event::WorkspacesChanged
containing the full current workspaces state. You do not need to separately send
Request::Workspaces
when using the event stream.
Where reasonable, event stream state updates are atomic, though this is not always the
case. For example, a window may end up with a workspace id for a workspace that had already
been removed. This can happen if the corresponding Event::WorkspacesChanged
arrives
before the corresponding Event::WindowOpenedOrChanged
.
ReturnError
Respond with an error (for testing error handling).
OverviewState
Request information about the overview.