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.
Commands
Section titled “Commands”aos display active
Section titled “aos display active”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
aos display activeaos capture screenshot --monitor=$(aos display active)aos display brightness
Section titled “aos display brightness”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
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 |
aos display brightness # BenQ GW2785TC (2): 64aos display brightness +20 # brighter on the focused window's monitoraos display brightness 2 50 # monitor 2 to 50aos display brightness --monitor=3aos display brightness --all 40aos display brightness --listaos display brightness -10 --jsonaos display focused
Section titled “aos display focused”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
aos display focusedaos window move Chrome --monitor=$(aos display focused)aos display list
Section titled “aos display list”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
aos display listaos display listaos display mirror
Section titled “aos display mirror”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
aos display mirror on|offaos display mirror onaos display mirror offaos display mode
Section titled “aos display mode”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
aos display mode <monitor id> <WxH[@Hz]>| flag | values | meaning |
|---|---|---|
<monitor id> |
Required positional argument | |
<WxH[@Hz]> |
Required positional argument |
aos display mode 2 2560x1440aos display mode 1 1920x1080@60aos display modes
Section titled “aos display modes”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
aos display modes <monitor id> [--json]| flag | values | meaning |
|---|---|---|
<monitor id> |
Required positional argument | |
--json |
Optional |
aos display modes 1aos display modes 2 --jsonaos display of
Section titled “aos display of”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
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 |
aos display of --app Safari # 2 BenQ GW2785TC brightness 64aos display of --window 12345 --json