= aerospace-swap(1)
include::util/man-attributes.adoc[]
:manname: aerospace-swap
// tag::purpose[]
:manpurpose: Swaps the focused window with another window.
// end::purpose[]

// =========================================================== Synopsis
== Synopsis
[verse]
// tag::synopsis[]
aerospace swap [-h|--help] [--window-id <window-id>] [--swap-focus]
               [--wrap-around] (left|down|up|right|dfs-next|dfs-prev)

// end::synopsis[]

// =========================================================== Description
== Description

// tag::body[]
{manpurpose}

The operation is equivalent to dragging a window with the mouse.

// =========================================================== Options
include::util/conditional-options-header.adoc[]

-h, --help:: Print help

--window-id <window-id>::
include::./util/window-id-flag-desc.adoc[]

--swap-focus::
Swap focus away from the currently focused window.
By default, this command does not change the focused window.

--wrap-around::
Wrap around if the window is at the edge of the workspace (for `(left|down|up|right)`) or the start/end of the depth first order (for `(dfs-next|dfs-prev)`).

// =========================================================== Arguments
include::./util/conditional-arguments-header.adoc[]

(left|down|up|right)::
Swaps the focused window with the nearest window in the given direction.

(dfs-next|dfs-prev)::
Swaps the focused window with the next or previous window in the depth-first order (top-to-bottom and left-to-right) of windows in the current workspace tree.

// end::body[]

// =========================================================== Footer
include::util/man-footer.adoc[]
