Skip to content

aos display

Attached monitors

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

Attached monitors. list prints each monitor with its geometry and which one is primary, active (has the pointer) and focused (has the frontmost window). active and focused print just the id, for scripts that pass it to --monitor. Monitor numbers can change when displays are plugged in or out. modes lists the resolutions a monitor supports; mode switches to one (the exact size, the highest refresh rate unless @Hz is given, and anything else is refused with the list); mirror on|off mirrors every monitor to the main one or extends the desktop again. On macOS changes last for the login session; on Linux they go through xrandr. brightness prints or sets a monitor’s brightness on a 0-100 scale, with +10 / -10 for relative steps like audio volume. With no id it acts on the monitor holding the focused window (else the one under the pointer) and prints which one changed, e.g. BenQ GW2785TC (2): 64. It drives the built-in panel and external monitors over DDC/CI (IOAVService on Apple Silicon Macs, dxva2 on Windows, ddcutil on Linux when installed); every write is read back. --all sets every monitor, --list shows each monitor’s name, value and whether it can be controlled, and --json gives {monitor, name, value, method}. A monitor that cannot be controlled, or a sleeping built-in panel, exits 2 with the reason. of --app <name> or of --window <id> prints the monitor that window is on, with its name and brightness. list also shows each monitor’s name as the OS reports it.

Print the ID of the monitor the pointer is on

needs a display

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos display active
Terminal window
aos capture screenshot --monitor=$(aos display active)

Print or set a monitor’s brightness 0-100: built-in panel or external over DDC/CI (default: the focused window’s monitor)

needs a display

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos display brightness [<monitor id>] [<0-100>|+<n>|-<n>] [--monitor=<id>] [--all] [--list] [--json]
flag values meaning
<monitor id> Optional positional argument
<0-100> Optional positional argument
<n> Optional positional argument
<n> Optional positional argument
--monitor <id> Optional
--all Optional
--list Optional
--json Optional
Terminal window
aos display brightness # BenQ GW2785TC (2): 64
aos display brightness +20 # brighter on the focused window's monitor
aos display brightness 2 50 # monitor 2 to 50
aos display brightness --monitor=3
aos display brightness --all 40
aos display brightness --list
aos display brightness -10 --json

Print the ID of the monitor holding the frontmost window

needs a display

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos display focused
Terminal window
aos window move Chrome --monitor=$(aos display focused)

List attached monitors with geometry and focus state

needs a display alias: aos monitors

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos display list
Terminal window
aos display list

Mirror every monitor to the main one (on) or extend the desktop (off)

needs a display

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos display mirror on|off
Terminal window
aos display mirror on
aos display mirror off

Switch a monitor to a resolution (highest refresh unless @Hz is given)

needs a display

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos display mode <monitor id> <WxH[@Hz]>
flag values meaning
<monitor id> Required positional argument
<WxH[@Hz]> Required positional argument
Terminal window
aos display mode 2 2560x1440
aos display mode 1 1920x1080@60

List the resolutions and refresh rates a monitor supports

needs a display

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos display modes <monitor id> [--json]
flag values meaning
<monitor id> Required positional argument
--json Optional
Terminal window
aos display modes 1
aos display modes 2 --json

Print the monitor an app’s or a window’s window is on: id, name and brightness

needs a display

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos display of --app=<name> | --window=<id> [--json]
flag values meaning
--app <name> One of these is required
--window <id> One of these is required
--json Optional
Terminal window
aos display of --app Safari # 2 BenQ GW2785TC brightness 64
aos display of --window 12345 --json