Enum niri_ipc::Action

source ·
pub enum Action {
Show 83 variants Quit { skip_confirmation: bool, }, PowerOffMonitors {}, PowerOnMonitors {}, Spawn { command: Vec<String>, }, DoScreenTransition { delay_ms: Option<u16>, }, Screenshot {}, ScreenshotScreen {}, ScreenshotWindow { id: Option<u64>, }, CloseWindow { id: Option<u64>, }, FullscreenWindow { id: Option<u64>, }, FocusWindow { id: u64, }, FocusColumnLeft {}, FocusColumnRight {}, FocusColumnFirst {}, FocusColumnLast {}, FocusColumnRightOrFirst {}, FocusColumnLeftOrLast {}, FocusWindowOrMonitorUp {}, FocusWindowOrMonitorDown {}, FocusColumnOrMonitorLeft {}, FocusColumnOrMonitorRight {}, FocusWindowDown {}, FocusWindowUp {}, FocusWindowDownOrColumnLeft {}, FocusWindowDownOrColumnRight {}, FocusWindowUpOrColumnLeft {}, FocusWindowUpOrColumnRight {}, FocusWindowOrWorkspaceDown {}, FocusWindowOrWorkspaceUp {}, MoveColumnLeft {}, MoveColumnRight {}, MoveColumnToFirst {}, MoveColumnToLast {}, MoveColumnLeftOrToMonitorLeft {}, MoveColumnRightOrToMonitorRight {}, MoveWindowDown {}, MoveWindowUp {}, MoveWindowDownOrToWorkspaceDown {}, MoveWindowUpOrToWorkspaceUp {}, ConsumeOrExpelWindowLeft { id: Option<u64>, }, ConsumeOrExpelWindowRight { id: Option<u64>, }, ConsumeWindowIntoColumn {}, ExpelWindowFromColumn {}, CenterColumn {}, FocusWorkspaceDown {}, FocusWorkspaceUp {}, FocusWorkspace { reference: WorkspaceReferenceArg, }, FocusWorkspacePrevious {}, MoveWindowToWorkspaceDown {}, MoveWindowToWorkspaceUp {}, MoveWindowToWorkspace { window_id: Option<u64>, reference: WorkspaceReferenceArg, }, MoveColumnToWorkspaceDown {}, MoveColumnToWorkspaceUp {}, MoveColumnToWorkspace { reference: WorkspaceReferenceArg, }, MoveWorkspaceDown {}, MoveWorkspaceUp {}, FocusMonitorLeft {}, FocusMonitorRight {}, FocusMonitorDown {}, FocusMonitorUp {}, MoveWindowToMonitorLeft {}, MoveWindowToMonitorRight {}, MoveWindowToMonitorDown {}, MoveWindowToMonitorUp {}, MoveColumnToMonitorLeft {}, MoveColumnToMonitorRight {}, MoveColumnToMonitorDown {}, MoveColumnToMonitorUp {}, SetWindowHeight { id: Option<u64>, change: SizeChange, }, ResetWindowHeight { id: Option<u64>, }, SwitchPresetColumnWidth {}, SwitchPresetWindowHeight { id: Option<u64>, }, MaximizeColumn {}, SetColumnWidth { change: SizeChange, }, SwitchLayout { layout: LayoutSwitchTarget, }, ShowHotkeyOverlay {}, MoveWorkspaceToMonitorLeft {}, MoveWorkspaceToMonitorRight {}, MoveWorkspaceToMonitorDown {}, MoveWorkspaceToMonitorUp {}, ToggleDebugTint {}, DebugToggleOpaqueRegions {}, DebugToggleDamage {},
}
Expand description

Actions that niri can perform.

Variants§

§

Quit

Exit niri.

Fields

§skip_confirmation: bool

Skip the “Press Enter to confirm” prompt.

§

PowerOffMonitors

Power off all monitors via DPMS.

§

PowerOnMonitors

Power on all monitors via DPMS.

§

Spawn

Spawn a command.

Fields

§command: Vec<String>

Command to spawn.

§

DoScreenTransition

Do a screen transition.

Fields

§delay_ms: Option<u16>

Delay in milliseconds for the screen to freeze before starting the transition.

§

Screenshot

Open the screenshot UI.

§

ScreenshotScreen

Screenshot the focused screen.

§

ScreenshotWindow

Screenshot a window.

Fields

§id: Option<u64>

Id of the window to screenshot.

If None, uses the focused window.

§

CloseWindow

Close a window.

Fields

§id: Option<u64>

Id of the window to close.

If None, uses the focused window.

§

FullscreenWindow

Toggle fullscreen on a window.

Fields

§id: Option<u64>

Id of the window to toggle fullscreen of.

If None, uses the focused window.

§

FocusWindow

Focus a window by id.

Fields

§id: u64

Id of the window to focus.

§

FocusColumnLeft

Focus the column to the left.

§

FocusColumnRight

Focus the column to the right.

§

FocusColumnFirst

Focus the first column.

§

FocusColumnLast

Focus the last column.

§

FocusColumnRightOrFirst

Focus the next column to the right, looping if at end.

§

FocusColumnLeftOrLast

Focus the next column to the left, looping if at start.

§

FocusWindowOrMonitorUp

Focus the window or the monitor above.

§

FocusWindowOrMonitorDown

Focus the window or the monitor below.

§

FocusColumnOrMonitorLeft

Focus the column or the monitor to the left.

§

FocusColumnOrMonitorRight

Focus the column or the monitor to the right.

§

FocusWindowDown

Focus the window below.

§

FocusWindowUp

Focus the window above.

§

FocusWindowDownOrColumnLeft

Focus the window below or the column to the left.

§

FocusWindowDownOrColumnRight

Focus the window below or the column to the right.

§

FocusWindowUpOrColumnLeft

Focus the window above or the column to the left.

§

FocusWindowUpOrColumnRight

Focus the window above or the column to the right.

§

FocusWindowOrWorkspaceDown

Focus the window or the workspace above.

§

FocusWindowOrWorkspaceUp

Focus the window or the workspace above.

§

MoveColumnLeft

Move the focused column to the left.

§

MoveColumnRight

Move the focused column to the right.

§

MoveColumnToFirst

Move the focused column to the start of the workspace.

§

MoveColumnToLast

Move the focused column to the end of the workspace.

§

MoveColumnLeftOrToMonitorLeft

Move the focused column to the left or to the monitor to the left.

§

MoveColumnRightOrToMonitorRight

Move the focused column to the right or to the monitor to the right.

§

MoveWindowDown

Move the focused window down in a column.

§

MoveWindowUp

Move the focused window up in a column.

§

MoveWindowDownOrToWorkspaceDown

Move the focused window down in a column or to the workspace below.

§

MoveWindowUpOrToWorkspaceUp

Move the focused window up in a column or to the workspace above.

§

ConsumeOrExpelWindowLeft

Consume or expel a window left.

Fields

§id: Option<u64>

Id of the window to consume or expel.

If None, uses the focused window.

§

ConsumeOrExpelWindowRight

Consume or expel a window right.

Fields

§id: Option<u64>

Id of the window to consume or expel.

If None, uses the focused window.

§

ConsumeWindowIntoColumn

Consume the window to the right into the focused column.

§

ExpelWindowFromColumn

Expel the focused window from the column.

§

CenterColumn

Center the focused column on the screen.

§

FocusWorkspaceDown

Focus the workspace below.

§

FocusWorkspaceUp

Focus the workspace above.

§

FocusWorkspace

Focus a workspace by reference (index or name).

Fields

§reference: WorkspaceReferenceArg

Reference (index or name) of the workspace to focus.

§

FocusWorkspacePrevious

Focus the previous workspace.

§

MoveWindowToWorkspaceDown

Move the focused window to the workspace below.

§

MoveWindowToWorkspaceUp

Move the focused window to the workspace above.

§

MoveWindowToWorkspace

Move a window to a workspace.

Fields

§window_id: Option<u64>

Id of the window to move.

If None, uses the focused window.

§reference: WorkspaceReferenceArg

Reference (index or name) of the workspace to move the window to.

§

MoveColumnToWorkspaceDown

Move the focused column to the workspace below.

§

MoveColumnToWorkspaceUp

Move the focused column to the workspace above.

§

MoveColumnToWorkspace

Move the focused column to a workspace by reference (index or name).

Fields

§reference: WorkspaceReferenceArg

Reference (index or name) of the workspace to move the column to.

§

MoveWorkspaceDown

Move the focused workspace down.

§

MoveWorkspaceUp

Move the focused workspace up.

§

FocusMonitorLeft

Focus the monitor to the left.

§

FocusMonitorRight

Focus the monitor to the right.

§

FocusMonitorDown

Focus the monitor below.

§

FocusMonitorUp

Focus the monitor above.

§

MoveWindowToMonitorLeft

Move the focused window to the monitor to the left.

§

MoveWindowToMonitorRight

Move the focused window to the monitor to the right.

§

MoveWindowToMonitorDown

Move the focused window to the monitor below.

§

MoveWindowToMonitorUp

Move the focused window to the monitor above.

§

MoveColumnToMonitorLeft

Move the focused column to the monitor to the left.

§

MoveColumnToMonitorRight

Move the focused column to the monitor to the right.

§

MoveColumnToMonitorDown

Move the focused column to the monitor below.

§

MoveColumnToMonitorUp

Move the focused column to the monitor above.

§

SetWindowHeight

Change the height of a window.

Fields

§id: Option<u64>

Id of the window whose height to set.

If None, uses the focused window.

§change: SizeChange

How to change the height.

§

ResetWindowHeight

Reset the height of a window back to automatic.

Fields

§id: Option<u64>

Id of the window whose height to reset.

If None, uses the focused window.

§

SwitchPresetColumnWidth

Switch between preset column widths.

§

SwitchPresetWindowHeight

Switch between preset window heights.

Fields

§id: Option<u64>

Id of the window whose height to switch.

If None, uses the focused window.

§

MaximizeColumn

Toggle the maximized state of the focused column.

§

SetColumnWidth

Change the width of the focused column.

Fields

§change: SizeChange

How to change the width.

§

SwitchLayout

Switch between keyboard layouts.

Fields

§layout: LayoutSwitchTarget

Layout to switch to.

§

ShowHotkeyOverlay

Show the hotkey overlay.

§

MoveWorkspaceToMonitorLeft

Move the focused workspace to the monitor to the left.

§

MoveWorkspaceToMonitorRight

Move the focused workspace to the monitor to the right.

§

MoveWorkspaceToMonitorDown

Move the focused workspace to the monitor below.

§

MoveWorkspaceToMonitorUp

Move the focused workspace to the monitor above.

§

ToggleDebugTint

Toggle a debug tint on windows.

§

DebugToggleOpaqueRegions

Toggle visualization of render element opaque regions.

§

DebugToggleDamage

Toggle visualization of output damage.

Trait Implementations§

source§

impl Clone for Action

source§

fn clone(&self) -> Action

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Action

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Action

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Action

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Action

§

impl RefUnwindSafe for Action

§

impl Send for Action

§

impl Sync for Action

§

impl Unpin for Action

§

impl UnwindSafe for Action

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,