Focus i3 Window
focus_windowFocus a window using direction, criteria (class, title, instance, mark, or con_id), parent/child container, floating/tiling layer, or output. Reversible.
Instructions
Move keyboard focus, selected by exactly one of: a direction; a specific window (class/title/instance/mark/con_id criteria); the parent/child container; the floating/tiling layer; or an output. Reversible. Supplying none or several selectors is rejected. To move the focused window instead of focusing, use move_window.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mark | No | Focus the window carrying this mark (criteria). | |
| layer | No | Focus the floating layer, the tiling layer, or toggle between them. | |
| title | No | Focus a window whose title matches (criteria). | |
| con_id | No | Focus the container with this exact i3 id (criteria). | |
| target | No | Focus the parent or child container of the current focus. | |
| instance | No | Focus a window whose WM_CLASS instance matches (criteria). | |
| direction | No | Focus the neighbour in this direction. | |
| window_class | No | Focus a window whose X11 class matches (criteria). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | First error message across the payload, or null on full success. | |
| success | Yes | True only if every command in the payload succeeded. | |
| outcomes | No | Per-command outcomes, in payload order. |