Documentation
¶
Overview ¶
Package actions contains all the actions Niri currently supports.
A thing to note: we need to add the models.AName embedded struct to all the actions:
models.AName{Name: "ActionName"}
Example:
type Quit struct{
models.AName
SkipConfirmation bool `json:"skip_confirmation"`
}
because we don't want to add the receiver functions for all 130+ actions. Supporting just one GetName() function for the interface, gives us some leeway when working with the actions.
See: https://yalter.github.io/niri/niri_ipc/enum.Action.html# for more details.
Index ¶
- Variables
- type AName
- type Action
- type CenterColumn
- type CenterVisibleColumns
- type CenterWindow
- type ClearDynamicCastTarget
- type CloseOverview
- type CloseWindow
- type ColumnDisplay
- type ConsumeOrExpelWindowLeft
- type ConsumeOrExpelWindowRight
- type ConsumeWindowIntoColumn
- type DebugToggleDamage
- type DebugToggleOpaqueRegions
- type DoScreenTransition
- type ExpandColumnToAvailableWidth
- type ExpelWindowFromColumn
- type FocusColumn
- type FocusColumnFirst
- type FocusColumnLast
- type FocusColumnLeft
- type FocusColumnLeftOrLast
- type FocusColumnOrMonitorLeft
- type FocusColumnOrMonitorRight
- type FocusColumnRight
- type FocusColumnRightOrFirst
- type FocusFloating
- type FocusMonitor
- type FocusMonitorDown
- type FocusMonitorLeft
- type FocusMonitorNext
- type FocusMonitorPrevious
- type FocusMonitorRight
- type FocusMonitorUp
- type FocusTiling
- type FocusWindow
- type FocusWindowBottom
- type FocusWindowDown
- type FocusWindowDownOrColumnLeft
- type FocusWindowDownOrColumnRight
- type FocusWindowDownOrTop
- type FocusWindowInColumn
- type FocusWindowOrMonitorDown
- type FocusWindowOrMonitorUp
- type FocusWindowOrWorkspaceDown
- type FocusWindowOrWorkspaceUp
- type FocusWindowPrevious
- type FocusWindowTop
- type FocusWindowUp
- type FocusWindowUpOrBottom
- type FocusWindowUpOrColumnLeft
- type FocusWindowUpOrColumnRight
- type FocusWorkspace
- type FocusWorkspaceDown
- type FocusWorkspacePrevious
- type FocusWorkspaceUp
- type FullscreenWindow
- type LayoutSwitchTarget
- type LoadConfigFile
- type MaximizeColumn
- type MaximizeWindowToEdges
- type MoveColumnLeft
- type MoveColumnLeftOrToMonitorLeft
- type MoveColumnRight
- type MoveColumnRightOrToMonitorRight
- type MoveColumnToFirst
- type MoveColumnToIndex
- type MoveColumnToLast
- type MoveColumnToMonitor
- type MoveColumnToMonitorDown
- type MoveColumnToMonitorLeft
- type MoveColumnToMonitorNext
- type MoveColumnToMonitorPrevious
- type MoveColumnToMonitorRight
- type MoveColumnToMonitorUp
- type MoveColumnToWorkspace
- type MoveColumnToWorkspaceDown
- type MoveColumnToWorkspaceUp
- type MoveFloatingWindow
- type MoveWindowDown
- type MoveWindowDownOrToWorkspaceDown
- type MoveWindowToFloating
- type MoveWindowToMonitor
- type MoveWindowToMonitorDown
- type MoveWindowToMonitorLeft
- type MoveWindowToMonitorNext
- type MoveWindowToMonitorPrevious
- type MoveWindowToMonitorRight
- type MoveWindowToMonitorUp
- type MoveWindowToTiling
- type MoveWindowToWorkspace
- type MoveWindowToWorkspaceDown
- type MoveWindowToWorkspaceUp
- type MoveWindowUp
- type MoveWindowUpOrToWorkspaceUp
- type MoveWorkspaceDown
- type MoveWorkspaceToIndex
- type MoveWorkspaceToMonitor
- type MoveWorkspaceToMonitorDown
- type MoveWorkspaceToMonitorLeft
- type MoveWorkspaceToMonitorNext
- type MoveWorkspaceToMonitorPrevious
- type MoveWorkspaceToMonitorRight
- type MoveWorkspaceToMonitorUp
- type MoveWorkspaceUp
- type OpenOverview
- type PositionChange
- type PowerOffMonitors
- type PowerOnMonitors
- type Quit
- type ResetWindowHeight
- type Screenshot
- type ScreenshotScreen
- type ScreenshotWindow
- type SetColumnDisplay
- type SetColumnWidth
- type SetDynamicCastMonitor
- type SetDynamicCastWindow
- type SetWindowHeight
- type SetWindowUrgent
- type SetWindowWidth
- type SetWorkspaceName
- type ShowHotkeyOverlay
- type SizeChange
- type Spawn
- type SpawnSh
- type SwapWindowLeft
- type SwapWindowRight
- type SwitchFocusBetweenFloatingAndTiling
- type SwitchLayout
- type SwitchPresetColumnWidth
- type SwitchPresetColumnWidthBack
- type SwitchPresetWindowHeight
- type SwitchPresetWindowHeightBack
- type SwitchPresetWindowWidth
- type SwitchPresetWindowWidthBack
- type ToggleColumnTabbedDisplay
- type ToggleDebugTint
- type ToggleKeyboardShortcutsInhibit
- type ToggleOverview
- type ToggleWindowFloating
- type ToggleWindowRuleOpacity
- type ToggleWindowUrgent
- type ToggleWindowedFullscreen
- type UnsetWindowUrgent
- type UnsetWorkspaceName
- type WorkspaceReferenceArg
Constants ¶
This section is empty.
Variables ¶
var ActionRegistry = map[string]func() Action{}/* 140 elements not displayed */
ActionRegistry contains all the actions Niri currently sends.
The key needs to be the action name, and it should return the correct action model, and set its AName embedded struct. If you know of a better way to handle this, please let me know.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface {
GetName() string
}
Action is the "base" interface for all the actions.
NOTE: We have to use GetName, since the field is called Name.
func FromRegistry ¶
FromRegistry returns the populated model from the ActionRegistry by given name.
func HandleDynamicIDs ¶ added in v0.2.0
func HandleDynamicIDs(a Action, possibleKeys models.PossibleKeys) Action
HandleDynamicIDs assigns the given possible keys to the action.
These are IDs or references we need to dynamically assign to the action, if they exist. For the reference, the ID takes precedence, then Index, and at last the Name. This is used for the matching of workspaces and windows. Since we only get to know the necessary IDs during runtime, we want to be able to set them dynamically.
func ParseRawActions ¶
func ParseRawActions(rawActions map[string]json.RawMessage) []Action
ParseRawActions parses the actions into their respective structs.
type CenterColumn ¶
type CenterColumn struct {
AName
}
CenterColumn centers the focused column on the screen.
type CenterVisibleColumns ¶
type CenterVisibleColumns struct {
AName
}
CenterVisibleColumns centers all fully visible columns on the screen.
type CenterWindow ¶
type CenterWindow struct {
AName
// ID the ID of the window to center. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
CenterWindow centers a window on the screen.
type ClearDynamicCastTarget ¶
type ClearDynamicCastTarget struct {
AName
}
ClearDynamicCastTarget clears the dynamic cast target, making it show nothing.
type CloseWindow ¶
type CloseWindow struct {
AName
// ID the ID of the window to close. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
CloseWindow closes a window.
type ColumnDisplay ¶
type ColumnDisplay struct {
Normal int `json:"Normal,omitempty"`
Tabbed int `json:"Tabbed,omitempty"`
}
ColumnDisplay sets the column display to either Normal (tiled) or Tabbed (tabs).
type ConsumeOrExpelWindowLeft ¶
type ConsumeOrExpelWindowLeft struct {
AName
// ID the ID of the window to consume or expel. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
ConsumeOrExpelWindowLeft consumes or expels a window left.
type ConsumeOrExpelWindowRight ¶
type ConsumeOrExpelWindowRight struct {
AName
// ID the ID of the window to consume or expel. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
ConsumeOrExpelWindowRight consumes or expels a window right.
type ConsumeWindowIntoColumn ¶
type ConsumeWindowIntoColumn struct {
AName
}
ConsumeWindowIntoColumn consumes the window to the right into the focused column.
type DebugToggleDamage ¶
type DebugToggleDamage struct {
AName
}
DebugToggleDamage toggles visualization of output damage.
type DebugToggleOpaqueRegions ¶
type DebugToggleOpaqueRegions struct {
AName
}
DebugToggleOpaqueRegions toggles visualization of render element opaque regions.
type DoScreenTransition ¶
type DoScreenTransition struct {
AName
// DelayMs the delay in ms for the screen to freeze before starting the transition.
DelayMs uint16 `json:"delay_ms"`
}
DoScreenTransition does a screen transition.
type ExpandColumnToAvailableWidth ¶
type ExpandColumnToAvailableWidth struct {
AName
}
ExpandColumnToAvailableWidth expands the focused column to space not taken up by other fully visible columns.
type ExpelWindowFromColumn ¶
type ExpelWindowFromColumn struct {
AName
}
ExpelWindowFromColumn expels the focused window from the column.
type FocusColumn ¶
type FocusColumn struct {
AName
// Index the index of the column to focus. The index starts from 1 for the first column.
Index uint `json:"index"`
}
FocusColumn focuses a column by index.
type FocusColumnFirst ¶
type FocusColumnFirst struct {
AName
}
FocusColumnFirst focuses the first column.
type FocusColumnLast ¶
type FocusColumnLast struct {
AName
}
FocusColumnLast focuses the last column.
type FocusColumnLeft ¶
type FocusColumnLeft struct {
AName
}
FocusColumnLeft focuses the column to the left.
type FocusColumnLeftOrLast ¶
type FocusColumnLeftOrLast struct {
AName
}
FocusColumnLeftOrLast focuses the next column on the left, looping if at start.
type FocusColumnOrMonitorLeft ¶
type FocusColumnOrMonitorLeft struct {
AName
}
FocusColumnOrMonitorLeft focuses the column or monitor to the left.
type FocusColumnOrMonitorRight ¶
type FocusColumnOrMonitorRight struct {
AName
}
FocusColumnOrMonitorRight focuses the column or monitor to the right.
type FocusColumnRight ¶
type FocusColumnRight struct {
AName
}
FocusColumnRight focuses the column to the right.
type FocusColumnRightOrFirst ¶
type FocusColumnRightOrFirst struct {
AName
}
FocusColumnRightOrFirst focuses the next column on the right, looping if at end.
type FocusFloating ¶
type FocusFloating struct {
AName
}
FocusFloating switches focus to the floating layout.
type FocusMonitor ¶
type FocusMonitor struct {
AName
// Output the name of the output to focus.
Output string `json:"output"`
}
FocusMonitor focuses a monitor by name.
type FocusMonitorDown ¶
type FocusMonitorDown struct {
AName
}
FocusMonitorDown focuses the monitor below.
type FocusMonitorLeft ¶
type FocusMonitorLeft struct {
AName
}
FocusMonitorLeft focuses the monitor to the left.
type FocusMonitorNext ¶
type FocusMonitorNext struct {
AName
}
FocusMonitorNext focuses the next monitor.
type FocusMonitorPrevious ¶
type FocusMonitorPrevious struct {
AName
}
FocusMonitorPrevious focuses the previous monitor.
type FocusMonitorRight ¶
type FocusMonitorRight struct {
AName
}
FocusMonitorRight focuses the monitor to the right.
type FocusMonitorUp ¶
type FocusMonitorUp struct {
AName
}
FocusMonitorUp focuses the monitor above.
type FocusTiling ¶
type FocusTiling struct {
AName
}
FocusTiling switches focus to the tiling layout.
type FocusWindow ¶
FocusWindow focuses a window by ID.
type FocusWindowBottom ¶
type FocusWindowBottom struct {
AName
}
FocusWindowBottom focuses the bottommost window.
type FocusWindowDown ¶
type FocusWindowDown struct {
AName
}
FocusWindowDown focuses the window below.
type FocusWindowDownOrColumnLeft ¶
type FocusWindowDownOrColumnLeft struct {
AName
}
FocusWindowDownOrColumnLeft focuses the window below or the column to the left.
type FocusWindowDownOrColumnRight ¶
type FocusWindowDownOrColumnRight struct {
AName
}
FocusWindowDownOrColumnRight focuses the window above or the column to the right.
type FocusWindowDownOrTop ¶
type FocusWindowDownOrTop struct {
AName
}
FocusWindowDownOrTop focuses the window below or the topmost window.
type FocusWindowInColumn ¶
type FocusWindowInColumn struct {
AName
// Index the index of the window in the column. The index starts from 1 for the topmost window.
Index uint8 `json:"index"`
}
FocusWindowInColumn focuses a window in the focused column by index.
type FocusWindowOrMonitorDown ¶
type FocusWindowOrMonitorDown struct {
AName
}
FocusWindowOrMonitorDown focuses the window or the monitor below.
type FocusWindowOrMonitorUp ¶
type FocusWindowOrMonitorUp struct {
AName
}
FocusWindowOrMonitorUp focuses the window or the monitor above.
type FocusWindowOrWorkspaceDown ¶
type FocusWindowOrWorkspaceDown struct {
AName
}
FocusWindowOrWorkspaceDown focuses the window or the workspace below.
type FocusWindowOrWorkspaceUp ¶
type FocusWindowOrWorkspaceUp struct {
AName
}
FocusWindowOrWorkspaceUp focuses the window or the workspace above.
type FocusWindowPrevious ¶
type FocusWindowPrevious struct {
AName
}
FocusWindowPrevious focuses the previously focused window.
type FocusWindowTop ¶
type FocusWindowTop struct {
AName
}
FocusWindowTop focuses the topmost window.
type FocusWindowUpOrBottom ¶
type FocusWindowUpOrBottom struct {
AName
}
FocusWindowUpOrBottom focuses the window above or the bottommost window.
type FocusWindowUpOrColumnLeft ¶
type FocusWindowUpOrColumnLeft struct {
AName
}
FocusWindowUpOrColumnLeft focuses the window above or the column to the left.
type FocusWindowUpOrColumnRight ¶
type FocusWindowUpOrColumnRight struct {
AName
}
FocusWindowUpOrColumnRight focuses the window above or the column to the right.
type FocusWorkspace ¶
type FocusWorkspace struct {
AName
// Reference the reference (id, index or name) of the workspace to focus.
Reference WorkspaceReferenceArg `json:"reference"`
}
FocusWorkspace focuses a workspace by reference (id, index or name).
type FocusWorkspaceDown ¶
type FocusWorkspaceDown struct {
AName
}
FocusWorkspaceDown focuses the workspace below.
type FocusWorkspacePrevious ¶
type FocusWorkspacePrevious struct {
AName
}
FocusWorkspacePrevious focuses the previous workspace.
type FocusWorkspaceUp ¶
type FocusWorkspaceUp struct {
AName
}
FocusWorkspaceUp focuses the workspace above.
type FullscreenWindow ¶
type FullscreenWindow struct {
AName
// ID the ID of the window to toggle. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
FullscreenWindow toggles fullscreen on a window.
type LayoutSwitchTarget ¶
type LayoutSwitchTarget struct {
// Next the next configured layout.
Next int `json:"Next,omitempty"`
// Prev the previous configured layout.
Prev int `json:"Prev,omitempty"`
// Index the specific layout by index.
Index uint8 `json:"Index,omitempty"`
}
LayoutSwitchTarget defines the layout to switch to.
type LoadConfigFile ¶ added in v0.8.0
type LoadConfigFile struct {
AName
}
LoadConfigFile reloads 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.
type MaximizeColumn ¶
type MaximizeColumn struct {
AName
}
MaximizeColumn toggles the maximized state of the focused column.
type MaximizeWindowToEdges ¶ added in v0.10.0
type MaximizeWindowToEdges struct {
AName
// ID of the window to maximize.
ID uint64 `json:"id,omitempty"`
}
MaximizeWindowToEdges toggles the maximized-to-edges state of the focused window.
type MoveColumnLeft ¶
type MoveColumnLeft struct {
AName
}
MoveColumnLeft moves the focused column to the left.
type MoveColumnLeftOrToMonitorLeft ¶
type MoveColumnLeftOrToMonitorLeft struct {
AName
}
MoveColumnLeftOrToMonitorLeft moves the focused column to the left, or to the monitor to the left.
type MoveColumnRight ¶
type MoveColumnRight struct {
AName
}
MoveColumnRight moves the focused column to the right.
type MoveColumnRightOrToMonitorRight ¶
type MoveColumnRightOrToMonitorRight struct {
AName
}
MoveColumnRightOrToMonitorRight moves the focused column to the right, or to the monitor to the right.
type MoveColumnToFirst ¶
type MoveColumnToFirst struct {
AName
}
MoveColumnToFirst moves the focused column to the start of the workspace.
type MoveColumnToIndex ¶
type MoveColumnToIndex struct {
AName
// Index is the new index for the column. The index starts from 1 for the first column.
Index uint `json:"index"`
}
MoveColumnToIndex moves the focused column to a specific index on its workspace.
type MoveColumnToLast ¶
type MoveColumnToLast struct {
AName
}
MoveColumnToLast moves the focused column to the end of the workspace.
type MoveColumnToMonitor ¶
type MoveColumnToMonitor struct {
AName
// Output the target output name.
Output string `json:"output"`
}
MoveColumnToMonitor moves the focused column to a specific monitor.
type MoveColumnToMonitorDown ¶
type MoveColumnToMonitorDown struct {
AName
}
MoveColumnToMonitorDown moves the focused column to the monitor below.
type MoveColumnToMonitorLeft ¶
type MoveColumnToMonitorLeft struct {
AName
}
MoveColumnToMonitorLeft moves the focused column to the monitor to the left.
type MoveColumnToMonitorNext ¶
type MoveColumnToMonitorNext struct {
AName
}
MoveColumnToMonitorNext moves the focused column to the next monitor.
type MoveColumnToMonitorPrevious ¶
type MoveColumnToMonitorPrevious struct {
AName
}
MoveColumnToMonitorPrevious moves the focused column to the previous monitor.
type MoveColumnToMonitorRight ¶
type MoveColumnToMonitorRight struct {
AName
}
MoveColumnToMonitorRight moves the focused column to the monitor to the right.
type MoveColumnToMonitorUp ¶
type MoveColumnToMonitorUp struct {
AName
}
MoveColumnToMonitorUp moves the focused column to the monitor above.
type MoveColumnToWorkspace ¶
type MoveColumnToWorkspace struct {
AName
// Reference the reference (id, index or name) of the workspace to move the column to.
Reference WorkspaceReferenceArg `json:"reference"`
// Focus follows the target workspace.
//
// If true (default), the focus will follow the column to the new workspace.
// If false, the focus will remain on the original workspace.
Focus bool `json:"focus"`
}
MoveColumnToWorkspace moves the focused column to a workspace by reference (id, index or name).
type MoveColumnToWorkspaceDown ¶
type MoveColumnToWorkspaceDown struct {
AName
// Focus follows the target workspace.
//
// If true (default), the focus will follow the column to the new workspace.
// If false, the focus will remain on the original workspace.
Focus bool `json:"focus"`
}
MoveColumnToWorkspaceDown moves the focused column to the workspace below.
type MoveColumnToWorkspaceUp ¶
type MoveColumnToWorkspaceUp struct {
AName
// Focus follows the target workspace.
//
// If true (default), the focus will follow the column to the new workspace.
// If false, the focus will remain on the original workspace.
Focus bool `json:"focus"`
}
MoveColumnToWorkspaceUp moves the focused column to the workspace above.
type MoveFloatingWindow ¶
type MoveFloatingWindow struct {
AName
// ID the ID of the window to move. If omitted, uses the focused window.
ID uint64 `json:"id"`
// X tells how to change the x position.
X PositionChange `json:"x"`
// Y tells how to change the y position.
Y PositionChange `json:"y"`
}
MoveFloatingWindow moves a floating window or screen.
type MoveWindowDown ¶
type MoveWindowDown struct {
AName
}
MoveWindowDown moves the focused window down in a column.
type MoveWindowDownOrToWorkspaceDown ¶
type MoveWindowDownOrToWorkspaceDown struct {
AName
}
MoveWindowDownOrToWorkspaceDown moves the focused window down in a column or the workspace below.
type MoveWindowToFloating ¶
type MoveWindowToFloating struct {
AName
// ID the ID of the window to toggle. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
MoveWindowToFloating moves a window to the floating layout.
type MoveWindowToMonitor ¶
type MoveWindowToMonitor struct {
AName
// ID the ID of the window to move. If omitted, uses the focused window.
ID uint64 `json:"id"`
// Output the target output name.
Output string `json:"output"`
}
MoveWindowToMonitor moves a window to a specific monitor.
type MoveWindowToMonitorDown ¶
type MoveWindowToMonitorDown struct {
AName
}
MoveWindowToMonitorDown moves the focused window to the monitor below.
type MoveWindowToMonitorLeft ¶
type MoveWindowToMonitorLeft struct {
AName
}
MoveWindowToMonitorLeft moves the focused window to the monitor to the left.
type MoveWindowToMonitorNext ¶
type MoveWindowToMonitorNext struct {
AName
}
MoveWindowToMonitorNext moves the focused window to the next monitor.
type MoveWindowToMonitorPrevious ¶
type MoveWindowToMonitorPrevious struct {
AName
}
MoveWindowToMonitorPrevious moves the focused window to the previous monitor.
type MoveWindowToMonitorRight ¶
type MoveWindowToMonitorRight struct {
AName
}
MoveWindowToMonitorRight moves the focused window to the monitor to the right.
type MoveWindowToMonitorUp ¶
type MoveWindowToMonitorUp struct {
AName
}
MoveWindowToMonitorUp moves the focused window to the monitor above.
type MoveWindowToTiling ¶
type MoveWindowToTiling struct {
AName
// ID the ID of the window to toggle. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
MoveWindowToTiling moves a window to the tiling layout.
type MoveWindowToWorkspace ¶
type MoveWindowToWorkspace struct {
AName
// WindowID the ID of the window to move. If omitted, uses the focused window.
WindowID uint64 `json:"window_id"`
// Reference the reference (id, index or name) of the workspace to move the window to.
Reference WorkspaceReferenceArg `json:"reference"`
// Focus follows the moved window.
//
// If true (default) and the window to move is focused, the focus will follow the window to the new workspace.
// If false, the focus will remain on the original workspace.
Focus bool `json:"focus"`
}
MoveWindowToWorkspace moves a window to a workspace.
type MoveWindowToWorkspaceDown ¶
type MoveWindowToWorkspaceDown struct {
AName
}
MoveWindowToWorkspaceDown moves the focused window to the workspace below.
type MoveWindowToWorkspaceUp ¶
type MoveWindowToWorkspaceUp struct {
AName
}
MoveWindowToWorkspaceUp moves the focused window to the workspace above.
type MoveWindowUp ¶
type MoveWindowUp struct {
AName
}
MoveWindowUp moves the focused window up in a column.
type MoveWindowUpOrToWorkspaceUp ¶
type MoveWindowUpOrToWorkspaceUp struct {
AName
}
MoveWindowUpOrToWorkspaceUp moves the focused window up in a column or to the workspace above.
type MoveWorkspaceDown ¶
type MoveWorkspaceDown struct {
AName
}
MoveWorkspaceDown moves the focused workspace below.
type MoveWorkspaceToIndex ¶
type MoveWorkspaceToIndex struct {
AName
// Index the new index for the workspace.
Index uint `json:"index"`
// Reference the reference (id, index or name) of the workspace to move. If omitted, uses the focused workspace.
Reference WorkspaceReferenceArg `json:"reference"`
}
MoveWorkspaceToIndex moves the focused workspace to a specific index on its monitor.
type MoveWorkspaceToMonitor ¶
type MoveWorkspaceToMonitor struct {
AName
// Output the target output name.
Output string `json:"output"`
// Reference the reference (id, index or name) of the workspace to move. If omitted, uses the focused workspace.
Reference WorkspaceReferenceArg `json:"reference"`
}
MoveWorkspaceToMonitor moves a workspace to a specific monitor.
type MoveWorkspaceToMonitorDown ¶
type MoveWorkspaceToMonitorDown struct {
AName
}
MoveWorkspaceToMonitorDown moves the focused workspace to the monitor below.
type MoveWorkspaceToMonitorLeft ¶
type MoveWorkspaceToMonitorLeft struct {
AName
}
MoveWorkspaceToMonitorLeft moves the focused workspace to the monitor to the left.
type MoveWorkspaceToMonitorNext ¶
type MoveWorkspaceToMonitorNext struct {
AName
}
MoveWorkspaceToMonitorNext moves the focused workspace to the next monitor.
type MoveWorkspaceToMonitorPrevious ¶
type MoveWorkspaceToMonitorPrevious struct {
AName
}
MoveWorkspaceToMonitorPrevious moves the focused workspace to the previous monitor.
type MoveWorkspaceToMonitorRight ¶
type MoveWorkspaceToMonitorRight struct {
AName
}
MoveWorkspaceToMonitorRight moves the focused workspace to the monitor to the right.
type MoveWorkspaceToMonitorUp ¶
type MoveWorkspaceToMonitorUp struct {
AName
}
MoveWorkspaceToMonitorUp moves the focused workspace to the monitor above.
type MoveWorkspaceUp ¶
type MoveWorkspaceUp struct {
AName
}
MoveWorkspaceUp moves the focused workspace above.
type PositionChange ¶
type PositionChange struct {
// SetFixed sets the position in logical pixels.
SetFixed float64 `json:"SetFixed,omitempty"`
// AdjustFixed adds or subtracts the current position in logical pixels.
AdjustFixed float64 `json:"AdjustFixed,omitempty"`
}
PositionChange defines how we want to position a window.
type PowerOffMonitors ¶
type PowerOffMonitors struct {
AName
}
PowerOffMonitors powers off all monitors via DPMS.
type PowerOnMonitors ¶
type PowerOnMonitors struct {
AName
}
PowerOnMonitors powers on all monitors via DPMS.
type Quit ¶
type Quit struct {
AName
// SkipConfirmation skips the "Press Enter to confirm" prompt.
SkipConfirmation bool `json:"skip_confirmation"`
}
Quit exits niri.
type ResetWindowHeight ¶
type ResetWindowHeight struct {
AName
// ID the ID of the window to reset the height for. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
ResetWindowHeight resets the height of a window back to automatic.
type Screenshot ¶
type Screenshot struct {
AName
// ShowPointer whether to show the pointer by default in the screenshot UI.
ShowPointer bool `json:"show_pointer"`
}
Screenshot opens the screenshot UI.
type ScreenshotScreen ¶
type ScreenshotScreen struct {
AName
// WriteToDisk writes the screenshot to disk in addition to putting it in the clipboard.
WriteToDisk bool `json:"write_to_disk"`
// ShowPointer whether to include the mouse pointer in the screenshot or not.
ShowPointer bool `json:"show_pointer"`
}
ScreenshotScreen screenshots the focused screen.
type ScreenshotWindow ¶
type ScreenshotWindow struct {
AName
// ID the ID of the window to screenshot.
ID uint64 `json:"id"`
// WriteToDisk writes the screenshot to disk in addition to putting it in the clipboard.
WriteToDisk bool `json:"write_to_disk"`
}
ScreenshotWindow screenshots a window.
type SetColumnDisplay ¶
type SetColumnDisplay struct {
AName
// Display display mode to set.
Display ColumnDisplay `json:"display"`
}
SetColumnDisplay sets the display mode of the focused column.
type SetColumnWidth ¶
type SetColumnWidth struct {
AName
// Change tells how to change the width.
Change SizeChange `json:"change"`
}
SetColumnWidth changes the width of the focused column.
type SetDynamicCastMonitor ¶
type SetDynamicCastMonitor struct {
AName
// Output the name of the output to target. If omitted, uses the focused output.
Output string `json:"output"`
}
SetDynamicCastMonitor sets the dynamic cast target to a monitor.
type SetDynamicCastWindow ¶
type SetDynamicCastWindow struct {
AName
// ID the ID of the window to target. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
SetDynamicCastWindow sets the dynamic cast target to a window.
type SetWindowHeight ¶
type SetWindowHeight struct {
AName
// ID the ID of the window to change the height for. If omitted, uses the focused window.
ID uint64 `json:"id"`
// Change tells how to change the height.
Change SizeChange `json:"change"`
}
SetWindowHeight changes the height of a window.
type SetWindowUrgent ¶
type SetWindowUrgent struct {
AName
// ID the ID of the window to set urgent.
ID uint64 `json:"id"`
}
SetWindowUrgent sets the urgent status of a window.
type SetWindowWidth ¶
type SetWindowWidth struct {
AName
// ID the ID of the window to change the width for. If omitted, uses the focused window.
ID uint64 `json:"id"`
// Change tells how to change the width.
Change SizeChange `json:"change"`
}
SetWindowWidth changes the width of a window.
type SetWorkspaceName ¶
type SetWorkspaceName struct {
AName
// Name the new name of the workspace.
Name string `json:"name"`
// Workspace the reference (id, index or name) of the workspace to name. If omitted, uses the focused workspace.
Workspace WorkspaceReferenceArg `json:"workspace"`
}
SetWorkspaceName sets the name of a workspace.
type ShowHotkeyOverlay ¶
type ShowHotkeyOverlay struct {
AName
}
ShowHotkeyOverlay shows the hotkey overlay.
type SizeChange ¶
type SizeChange struct {
// SetFixed sets the size in logical pixels.
SetFixed int32 `json:"SetFixed,omitempty"`
// SetProportion sets the size as a proportion of the working area.
SetProportion float64 `json:"SetProportion,omitempty"`
// AdjustFixed adds or subtracts the current size in logical pixels.
AdjustFixed int32 `json:"AdjustFixed,omitempty"`
// AdjustProportion adds or subtracts the current size as a proportion of the working area.
AdjustProportion float64 `json:"AdjustProportion,omitempty"`
}
SizeChange defines how we want to change the size of a window.
type SwapWindowLeft ¶
type SwapWindowLeft struct {
AName
}
SwapWindowLeft swaps the focused window with the one to the left.
type SwapWindowRight ¶
type SwapWindowRight struct {
AName
}
SwapWindowRight swaps the focused window with the one to the right.
type SwitchFocusBetweenFloatingAndTiling ¶
type SwitchFocusBetweenFloatingAndTiling struct {
AName
}
SwitchFocusBetweenFloatingAndTiling toggles the focus between floating and tiling layout.
type SwitchLayout ¶
type SwitchLayout struct {
AName
// Layout the layout to switch to.
Layout LayoutSwitchTarget `json:"layout"`
}
SwitchLayout switches between keyboard layouts.
type SwitchPresetColumnWidth ¶
type SwitchPresetColumnWidth struct {
AName
}
SwitchPresetColumnWidth switches between preset column widths.
type SwitchPresetColumnWidthBack ¶ added in v0.8.0
type SwitchPresetColumnWidthBack struct {
AName
}
SwitchPresetColumnWidthBack switches between preset column widths backwards.
type SwitchPresetWindowHeight ¶
type SwitchPresetWindowHeight struct {
AName
// ID the ID of the window to switch the height for. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
SwitchPresetWindowHeight switches between preset window heights.
type SwitchPresetWindowHeightBack ¶ added in v0.8.0
type SwitchPresetWindowHeightBack struct {
AName
// ID the ID of the window whose height to switch. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
SwitchPresetWindowHeightBack switches between preset window heights backwards.
type SwitchPresetWindowWidth ¶
type SwitchPresetWindowWidth struct {
AName
// ID the ID of the window to switch the width for. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
SwitchPresetWindowWidth switches between preset window widths.
type SwitchPresetWindowWidthBack ¶ added in v0.8.0
type SwitchPresetWindowWidthBack struct {
AName
// ID the ID of the window whose width to switch. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
SwitchPresetWindowWidthBack switches between preset window widths backwards.
type ToggleColumnTabbedDisplay ¶
type ToggleColumnTabbedDisplay struct {
AName
}
ToggleColumnTabbedDisplay toggles the focused column between normal and tabbed display.
type ToggleDebugTint ¶
type ToggleDebugTint struct {
AName
}
ToggleDebugTint toggles a debug tint on windows.
type ToggleKeyboardShortcutsInhibit ¶
type ToggleKeyboardShortcutsInhibit struct {
AName
}
ToggleKeyboardShortcutsInhibit enables or disables the keyboard shortcuts inhibitor (if any) for the focused surface.
type ToggleWindowFloating ¶
type ToggleWindowFloating struct {
AName
// ID the ID of the window to toggle. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
ToggleWindowFloating toggles the focused window between floating and tiling layout.
type ToggleWindowRuleOpacity ¶
type ToggleWindowRuleOpacity struct {
AName
// ID the ID of the window to toggle. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
ToggleWindowRuleOpacity toggles the opacity of a window.
type ToggleWindowUrgent ¶
type ToggleWindowUrgent struct {
AName
// ID the ID of the window to toggle.
ID uint64 `json:"id"`
}
ToggleWindowUrgent toggles the urgent status of a window.
type ToggleWindowedFullscreen ¶
type ToggleWindowedFullscreen struct {
AName
// ID the ID of the window to toggle. If omitted, uses the focused window.
ID uint64 `json:"id"`
}
ToggleWindowedFullscreen toggles windowed (fake) fullscreen on a window.
type UnsetWindowUrgent ¶
type UnsetWindowUrgent struct {
AName
// ID the ID of the window to unset urgent.
ID uint64 `json:"id"`
}
UnsetWindowUrgent unsets the urgent status of a window.
type UnsetWorkspaceName ¶
type UnsetWorkspaceName struct {
AName
// Reference the reference (id, index or name) of the workspace to unname. If omitted, uses the focused workspace.
Reference WorkspaceReferenceArg `json:"reference"`
}
UnsetWorkspaceName unsets the name of a workspace.
type WorkspaceReferenceArg ¶
type WorkspaceReferenceArg struct {
// ID the ID of the workspace.
ID uint64 `json:"Id,omitempty"`
// Index the index of the workspace.
Index uint8 `json:"Index,omitempty"`
// Name the name of the workspace.
Name string `json:"Name,omitempty"`
}
WorkspaceReferenceArg takes either the ID, Index or Name of the workspace.