Skip to content

aos window

Desktop windows: list, focus, move, resize, arrange

8 commands. Run aos window --help for the same list from the binary, or see every group.

Desktop windows on every platform: list them with geometry, focus one, move it to a zone or exact bounds, resize it, wait for one to appear, and save or apply a whole layout. Zones are 1A/1B for halves, 2A to 2D for quarters and M:N for the M-th of N columns; zones shows them on a real monitor.

Apply a saved layout of many windows in one pass

needs a display

Terminal window
aos window arrange <layout.json | ->
flag values meaning
<layout.json | -> Required positional argument
Terminal window
aos window arrange ~/.config/aos/layouts/work.json
echo '[{"app":"Google Chrome","zone":"1A"},{"app":"Slack","zone":"1B"}]' | aos window arrange -

Bring a window to the front

needs a display

Terminal window
aos window focus <app> | --app=<name> | --title=<substring>
flag values meaning
<app> One of these is required
--app <name> One of these is required
--title <substring> One of these is required
Terminal window
aos window focus Chrome

List open windows

needs a display

Terminal window
aos window list [--app=<name>] [--title=<substring>] [--kind=browser|terminal|editor|files|other] [--json]
flag values meaning
--app <name> Optional
--title <substring> Optional
--kind browser, terminal, editor, files, other Optional
--json Optional
Terminal window
aos window list
aos window list --app=Chrome
aos window list --kind=terminal

Move a window to a zone, a split, or absolute bounds

needs a display

Terminal window
aos window move <app> (--zone=<1A|2:1> | --at=<x,y,w,h>) [--monitor=<n>]
flag values meaning
<app> Required positional argument
--zone 1A, 2:1 One of these is required
--at <x,y,w,h> One of these is required. comma-separated
--monitor <n> Optional
Terminal window
aos window move Chrome --zone=1B
aos window move Chrome --monitor=2 --zone=1:3
aos window move Slack --at=0,25,1920,1055

Resize a window in place

needs a display

Terminal window
aos window resize <app> --w=<width> --h=<height>
flag values meaning
<app> Required positional argument
--w <width> Required
--h <height> Required
Terminal window
aos window resize Chrome --w=900 --h=700

Save the current layout to a file window arrange can apply

needs a display

Terminal window
aos window save <layout.json> [--app=<name>] [--monitor=<n>]
flag values meaning
<layout.json> Required positional argument
--app <name> Optional
--monitor <n> Optional
Terminal window
aos window save ~/.config/aos/layouts/work.json
aos window save ~/work.json --app=Chrome
aos window save ~/second-screen.json --monitor=2

Wait for a window to appear, then print it

needs a display

Terminal window
aos window wait <app> [--timeout=<ms>]
flag values meaning
<app> Required positional argument
--timeout <ms> Optional
Terminal window
aos window wait Chrome --timeout=5000

Show what each zone means on a real monitor

needs a display

Terminal window
aos window zones [--monitor=<n>] [--show]
flag values meaning
--monitor <n> Optional
--show Optional
Terminal window
aos window zones
aos window zones --monitor=2
aos window zones --show --app=Chrome