pub enum Action {
Show 139 variants
Quit {
skip_confirmation: bool,
},
PowerOffMonitors {},
PowerOnMonitors {},
Spawn {
command: Vec<String>,
},
SpawnSh {
command: String,
},
DoScreenTransition {
delay_ms: Option<u16>,
},
Screenshot {
show_pointer: bool,
},
ScreenshotScreen {
write_to_disk: bool,
show_pointer: bool,
},
ScreenshotWindow {
id: Option<u64>,
write_to_disk: bool,
},
ToggleKeyboardShortcutsInhibit {},
CloseWindow {
id: Option<u64>,
},
FullscreenWindow {
id: Option<u64>,
},
ToggleWindowedFullscreen {
id: Option<u64>,
},
FocusWindow {
id: u64,
},
FocusWindowInColumn {
index: u8,
},
FocusWindowPrevious {},
FocusColumnLeft {},
FocusColumnRight {},
FocusColumnFirst {},
FocusColumnLast {},
FocusColumnRightOrFirst {},
FocusColumnLeftOrLast {},
FocusColumn {
index: usize,
},
FocusWindowOrMonitorUp {},
FocusWindowOrMonitorDown {},
FocusColumnOrMonitorLeft {},
FocusColumnOrMonitorRight {},
FocusWindowDown {},
FocusWindowUp {},
FocusWindowDownOrColumnLeft {},
FocusWindowDownOrColumnRight {},
FocusWindowUpOrColumnLeft {},
FocusWindowUpOrColumnRight {},
FocusWindowOrWorkspaceDown {},
FocusWindowOrWorkspaceUp {},
FocusWindowTop {},
FocusWindowBottom {},
FocusWindowDownOrTop {},
FocusWindowUpOrBottom {},
MoveColumnLeft {},
MoveColumnRight {},
MoveColumnToFirst {},
MoveColumnToLast {},
MoveColumnLeftOrToMonitorLeft {},
MoveColumnRightOrToMonitorRight {},
MoveColumnToIndex {
index: usize,
},
MoveWindowDown {},
MoveWindowUp {},
MoveWindowDownOrToWorkspaceDown {},
MoveWindowUpOrToWorkspaceUp {},
ConsumeOrExpelWindowLeft {
id: Option<u64>,
},
ConsumeOrExpelWindowRight {
id: Option<u64>,
},
ConsumeWindowIntoColumn {},
ExpelWindowFromColumn {},
SwapWindowRight {},
SwapWindowLeft {},
ToggleColumnTabbedDisplay {},
SetColumnDisplay {
display: ColumnDisplay,
},
CenterColumn {},
CenterWindow {
id: Option<u64>,
},
CenterVisibleColumns {},
FocusWorkspaceDown {},
FocusWorkspaceUp {},
FocusWorkspace {
reference: WorkspaceReferenceArg,
},
FocusWorkspacePrevious {},
MoveWindowToWorkspaceDown {
focus: bool,
},
MoveWindowToWorkspaceUp {
focus: bool,
},
MoveWindowToWorkspace {
window_id: Option<u64>,
reference: WorkspaceReferenceArg,
focus: bool,
},
MoveColumnToWorkspaceDown {
focus: bool,
},
MoveColumnToWorkspaceUp {
focus: bool,
},
MoveColumnToWorkspace {
reference: WorkspaceReferenceArg,
focus: bool,
},
MoveWorkspaceDown {},
MoveWorkspaceUp {},
MoveWorkspaceToIndex {
index: usize,
reference: Option<WorkspaceReferenceArg>,
},
SetWorkspaceName {
name: String,
workspace: Option<WorkspaceReferenceArg>,
},
UnsetWorkspaceName {
reference: Option<WorkspaceReferenceArg>,
},
FocusMonitorLeft {},
FocusMonitorRight {},
FocusMonitorDown {},
FocusMonitorUp {},
FocusMonitorPrevious {},
FocusMonitorNext {},
FocusMonitor {
output: String,
},
MoveWindowToMonitorLeft {},
MoveWindowToMonitorRight {},
MoveWindowToMonitorDown {},
MoveWindowToMonitorUp {},
MoveWindowToMonitorPrevious {},
MoveWindowToMonitorNext {},
MoveWindowToMonitor {
id: Option<u64>,
output: String,
},
MoveColumnToMonitorLeft {},
MoveColumnToMonitorRight {},
MoveColumnToMonitorDown {},
MoveColumnToMonitorUp {},
MoveColumnToMonitorPrevious {},
MoveColumnToMonitorNext {},
MoveColumnToMonitor {
output: String,
},
SetWindowWidth {
id: Option<u64>,
change: SizeChange,
},
SetWindowHeight {
id: Option<u64>,
change: SizeChange,
},
ResetWindowHeight {
id: Option<u64>,
},
SwitchPresetColumnWidth {},
SwitchPresetColumnWidthBack {},
SwitchPresetWindowWidth {
id: Option<u64>,
},
SwitchPresetWindowWidthBack {
id: Option<u64>,
},
SwitchPresetWindowHeight {
id: Option<u64>,
},
SwitchPresetWindowHeightBack {
id: Option<u64>,
},
MaximizeColumn {},
SetColumnWidth {
change: SizeChange,
},
ExpandColumnToAvailableWidth {},
SwitchLayout {
layout: LayoutSwitchTarget,
},
ShowHotkeyOverlay {},
MoveWorkspaceToMonitorLeft {},
MoveWorkspaceToMonitorRight {},
MoveWorkspaceToMonitorDown {},
MoveWorkspaceToMonitorUp {},
MoveWorkspaceToMonitorPrevious {},
MoveWorkspaceToMonitorNext {},
MoveWorkspaceToMonitor {
output: String,
reference: Option<WorkspaceReferenceArg>,
},
ToggleDebugTint {},
DebugToggleOpaqueRegions {},
DebugToggleDamage {},
ToggleWindowFloating {
id: Option<u64>,
},
MoveWindowToFloating {
id: Option<u64>,
},
MoveWindowToTiling {
id: Option<u64>,
},
FocusFloating {},
FocusTiling {},
SwitchFocusBetweenFloatingAndTiling {},
MoveFloatingWindow {
id: Option<u64>,
x: PositionChange,
y: PositionChange,
},
ToggleWindowRuleOpacity {
id: Option<u64>,
},
SetDynamicCastWindow {
id: Option<u64>,
},
SetDynamicCastMonitor {
output: Option<String>,
},
ClearDynamicCastTarget {},
ToggleOverview {},
OpenOverview {},
CloseOverview {},
ToggleWindowUrgent {
id: u64,
},
SetWindowUrgent {
id: u64,
},
UnsetWindowUrgent {
id: u64,
},
LoadConfigFile {},
}
Expand description
Actions that niri can perform.
Variants§
Quit
Exit niri.
PowerOffMonitors
Power off all monitors via DPMS.
PowerOnMonitors
Power on all monitors via DPMS.
Spawn
Spawn a command.
SpawnSh
Spawn a command through the shell.
DoScreenTransition
Do a screen transition.
Fields
Screenshot
Open the screenshot UI.
ScreenshotScreen
Screenshot the focused screen.
Fields
ScreenshotWindow
Screenshot a window.
Fields
ToggleKeyboardShortcutsInhibit
Enable or disable the keyboard shortcuts inhibitor (if any) for the focused surface.
CloseWindow
Close a window.
FullscreenWindow
Toggle fullscreen on a window.
ToggleWindowedFullscreen
Toggle windowed (fake) fullscreen on a window.
Fields
FocusWindow
Focus a window by id.
FocusWindowInColumn
Focus a window in the focused column by index.
FocusWindowPrevious
Focus the previously focused window.
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.
FocusColumn
Focus a column by index.
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 below.
FocusWindowOrWorkspaceUp
Focus the window or the workspace above.
FocusWindowTop
Focus the topmost window.
FocusWindowBottom
Focus the bottommost window.
FocusWindowDownOrTop
Focus the window below or the topmost window.
FocusWindowUpOrBottom
Focus the window above or the bottommost window.
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.
MoveColumnToIndex
Move the focused column to a specific index on its workspace.
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.
ConsumeOrExpelWindowRight
Consume or expel a window right.
ConsumeWindowIntoColumn
Consume the window to the right into the focused column.
ExpelWindowFromColumn
Expel the focused window from the column.
SwapWindowRight
Swap focused window with one to the right.
SwapWindowLeft
Swap focused window with one to the left.
ToggleColumnTabbedDisplay
Toggle the focused column between normal and tabbed display.
SetColumnDisplay
Set the display mode of the focused column.
Fields
display: ColumnDisplay
Display mode to set.
CenterColumn
Center the focused column on the screen.
CenterWindow
Center a window on the screen.
CenterVisibleColumns
Center all fully visible columns 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.
Fields
MoveWindowToWorkspaceUp
Move the focused window to the workspace above.
Fields
MoveWindowToWorkspace
Move a window to a workspace.
Fields
reference: WorkspaceReferenceArg
Reference (index or name) of the workspace to move the window to.
MoveColumnToWorkspaceDown
Move the focused column to the workspace below.
Fields
MoveColumnToWorkspaceUp
Move the focused column to the workspace above.
Fields
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.
MoveWorkspaceToIndex
Move a workspace to a specific index on its monitor.
Fields
reference: Option<WorkspaceReferenceArg>
Reference (index or name) of the workspace to move.
If None
, uses the focused workspace.
SetWorkspaceName
Set the name of a workspace.
Fields
workspace: Option<WorkspaceReferenceArg>
Reference (index or name) of the workspace to name.
If None
, uses the focused workspace.
UnsetWorkspaceName
Unset the name of a workspace.
Fields
reference: Option<WorkspaceReferenceArg>
Reference (index or name) of the workspace to unname.
If None
, uses the focused workspace.
FocusMonitorLeft
Focus the monitor to the left.
FocusMonitorRight
Focus the monitor to the right.
FocusMonitorDown
Focus the monitor below.
FocusMonitorUp
Focus the monitor above.
FocusMonitorPrevious
Focus the previous monitor.
FocusMonitorNext
Focus the next monitor.
FocusMonitor
Focus a monitor by name.
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.
MoveWindowToMonitorPrevious
Move the focused window to the previous monitor.
MoveWindowToMonitorNext
Move the focused window to the next monitor.
MoveWindowToMonitor
Move a window to a specific monitor.
Fields
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.
MoveColumnToMonitorPrevious
Move the focused column to the previous monitor.
MoveColumnToMonitorNext
Move the focused column to the next monitor.
MoveColumnToMonitor
Move the focused column to a specific monitor.
SetWindowWidth
Change the width of a window.
Fields
change: SizeChange
How to change the width.
SetWindowHeight
Change the height of a window.
Fields
change: SizeChange
How to change the height.
ResetWindowHeight
Reset the height of a window back to automatic.
SwitchPresetColumnWidth
Switch between preset column widths.
SwitchPresetColumnWidthBack
Switch between preset column widths backwards.
SwitchPresetWindowWidth
Switch between preset window widths.
SwitchPresetWindowWidthBack
Switch between preset window widths backwards.
SwitchPresetWindowHeight
Switch between preset window heights.
SwitchPresetWindowHeightBack
Switch between preset window heights backwards.
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.
ExpandColumnToAvailableWidth
Expand the focused column to space not taken up by other fully visible columns.
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.
MoveWorkspaceToMonitorPrevious
Move the focused workspace to the previous monitor.
MoveWorkspaceToMonitorNext
Move the focused workspace to the next monitor.
MoveWorkspaceToMonitor
Move a workspace to a specific monitor.
Fields
reference: Option<WorkspaceReferenceArg>
If None
, uses the focused workspace.
ToggleDebugTint
Toggle a debug tint on windows.
DebugToggleOpaqueRegions
Toggle visualization of render element opaque regions.
DebugToggleDamage
Toggle visualization of output damage.
ToggleWindowFloating
Move the focused window between the floating and the tiling layout.
MoveWindowToFloating
Move the focused window to the floating layout.
MoveWindowToTiling
Move the focused window to the tiling layout.
FocusFloating
Switches focus to the floating layout.
FocusTiling
Switches focus to the tiling layout.
SwitchFocusBetweenFloatingAndTiling
Toggles the focus between the floating and the tiling layout.
MoveFloatingWindow
Move a floating window on screen.
Fields
x: PositionChange
How to change the X position.
y: PositionChange
How to change the Y position.
ToggleWindowRuleOpacity
Toggle the opacity of a window.
SetDynamicCastWindow
Set the dynamic cast target to a window.
SetDynamicCastMonitor
Set the dynamic cast target to a monitor.
ClearDynamicCastTarget
Clear the dynamic cast target, making it show nothing.
ToggleOverview
Toggle (open/close) the Overview.
OpenOverview
Open the Overview.
CloseOverview
Close the Overview.
ToggleWindowUrgent
Toggle urgent status of a window.
SetWindowUrgent
Set urgent status of a window.
UnsetWindowUrgent
Unset urgent status of a window.
LoadConfigFile
Reload the config file.
Can be useful for scripts changing the config file, to avoid waiting the small duration for niri’s config file watcher to notice the changes.