hl.dsp.window.move

hl.dsp.window.move(spec)

Create a window move dispatcher.

Signature

hl.dsp.window.move(spec: table): HL.Dispatcher

Parameters

spectable

Window move operation table.

Accepted fields

directionstring, optional

Move the window in a direction. If group_aware is true, move the window or group as appropriate.

group_awareboolean, optional

Only used with direction.

x, ynumber, optional

Move by exact vector. Both fields are required for vector movement.

relativeboolean, optional

Only used with x and y. If true, treat the vector as relative.

workspaceHL.WorkspaceSelector, optional

Move the window to a workspace.

monitorHL.MonitorSelector, optional

Move the window to a monitor.

followboolean, optional

Used with workspace or monitor. If false, the move is silent.

into_groupstring, optional

Move into a group in the given direction.

into_or_create_groupstring, optional

Move into an existing group in the given direction, or create one.

out_of_groupstring or boolean, optional

Move out of a group. A string is parsed as a direction; boolean true uses the default direction.

windowHL.WindowSelector, optional

Target window.

Returns

dispatcherHL.Dispatcher

Dispatcher object returned by this function.

Examples

hl.dispatch(hl.dsp.window.move({ direction = "left" }))
hl.dispatch(hl.dsp.window.move({ x = 100, y = 0, relative = true }))
hl.dispatch(hl.dsp.window.move({ workspace = 3, follow = false }))

Notes

If multiple recognized move forms are present, the implementation checks them in this order: direction, x/y, workspace, monitor, into_group, into_or_create_group, out_of_group.

See also

HL.Dispatcher

Dispatcher object returned by this function.

hl.dsp.window.resize()

Resize a window.