pub enum Request {
Version,
Outputs,
Workspaces,
Windows,
Layers,
KeyboardLayouts,
FocusedOutput,
FocusedWindow,
Action(Action),
Output {
output: String,
action: OutputAction,
},
EventStream,
ReturnError,
}
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.
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).
Trait Implementations§
source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)