aos window
Desktop windows: list, focus, move, resize, arrange
10 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. desktop toggles Show Desktop.
Commands
Section titled “Commands”aos window arrange
Section titled “aos window arrange”Apply a saved layout of many windows in one pass
needs a display
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos window arrange <layout.json | ->| flag | values | meaning |
|---|---|---|
<layout.json | -> |
Required positional argument |
aos window arrange ~/.config/aos/layouts/work.jsonecho '[{"app":"Google Chrome","zone":"1A"},{"app":"Slack","zone":"1B"}]' | aos window arrange -aos window desktop
Section titled “aos window desktop”Show the desktop (toggle: run again to bring the windows back)
needs a display
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos window desktopaos window desktopaos window focus
Section titled “aos window focus”Bring a window to the front
needs a display
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos window focus <app> | --app=<name> | --title=<substring> [--force]| flag | values | meaning |
|---|---|---|
<app> |
One of these is required | |
--app |
<name> |
One of these is required |
--title |
<substring> |
One of these is required |
--force |
Optional |
aos window focus Chrome# polite: exit 5 when someone used the machine in the last 5s; --force overridesaos window list
Section titled “aos window list”List open windows
needs a display
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
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 |
aos window listaos window list --app=Chromeaos window list --kind=terminalaos window move
Section titled “aos window move”Move a window to a zone, a split, or absolute bounds
needs a display
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
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 |
aos window move Chrome --zone=1Baos window move Chrome --monitor=2 --zone=1:3aos window move Slack --at=0,25,1920,1055aos window resize
Section titled “aos window resize”Resize a window in place
needs a display
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos window resize <app> --w=<width> --h=<height>| flag | values | meaning |
|---|---|---|
<app> |
Required positional argument | |
--w |
<width> |
Required |
--h |
<height> |
Required |
aos window resize Chrome --w=900 --h=700aos window save
Section titled “aos window save”Save the current layout to a file window arrange can apply
needs a display
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos window save <layout.json> [--app=<name>] [--monitor=<n>]| flag | values | meaning |
|---|---|---|
<layout.json> |
Required positional argument | |
--app |
<name> |
Optional |
--monitor |
<n> |
Optional |
aos window save ~/.config/aos/layouts/work.jsonaos window save ~/work.json --app=Chromeaos window save ~/second-screen.json --monitor=2aos window text
Section titled “aos window text”Print all the text of a window, in reading order (accessibility, OCR fallback)
needs a display
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos window text (<app> | --app=<name> | --title=<substring> | --id=<window id> | --focused) [--source=auto|accessibility|ocr] [--json] [--plain] [--max-chars=<n>] [--timeout=<ms>] [--raise]| flag | values | meaning |
|---|---|---|
<app> |
One of these is required | |
--app |
<name> |
One of these is required |
--title |
<substring> |
One of these is required |
--id |
<window id> |
One of these is required |
--focused |
One of these is required | |
--source |
auto, accessibility, ocr |
Optional |
--json |
Optional | |
--plain |
Optional | |
--max-chars |
<n> |
Optional |
--timeout |
<ms> |
Optional |
--raise |
Optional |
aos window text TextEditaos window text --focused --max-chars=4000aos window text --app=Chrome --jsonaos window text --id=12345 --source=ocr --raise # OCR a covered window: brings it to the front, then hands focus back# auto reads the accessibility tree (AX / UI Automation / AT-SPI) and falls back to OCR when it has almost no text# exit 3 when no window matchesaos window wait
Section titled “aos window wait”Wait for a window to appear, then print it
needs a display
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos window wait <app> [--timeout=<ms>]| flag | values | meaning |
|---|---|---|
<app> |
Required positional argument | |
--timeout |
<ms> |
Optional |
aos window wait Chrome --timeout=5000aos window zones
Section titled “aos window zones”Show what each zone means on a real monitor
needs a display
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos window zones [--monitor=<n>] [--show]| flag | values | meaning |
|---|---|---|
--monitor |
<n> |
Optional |
--show |
Optional |
aos window zonesaos window zones --monitor=2aos window zones --show --app=Chrome