aos power
Power source detection and keep-awake
4 commands. Run aos power --help for the same list from the binary, or see every group.
Whether the machine runs on mains power or battery. For charge level, see battery. awake keeps the machine from sleeping, for --for=2h or until aos power awake off; --display keeps the screen on too. It is held by a small child process (caffeinate, systemd-inhibit, or aos itself on Windows), so a crash or reboot never leaves the machine stuck awake.
Commands
Section titled “Commands”aos power awake
Section titled “aos power awake”Keep the machine from sleeping, for a while or until power awake off
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos power awake [--for=<duration>] [--display] [--json]| flag | values | meaning |
|---|---|---|
--for |
<duration> |
Optional |
--display |
Optional | |
--json |
Optional |
aos power awake --for=2haos power awake --for=30m --displayaos power awake # until `aos power awake off`aos power awake off
Section titled “aos power awake off”End the keep-awake started by power awake
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos power awake offaos power awake offaos power awake status
Section titled “aos power awake status”Print whether a keep-awake is active and until when
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos power awake status [--json]| flag | values | meaning |
|---|---|---|
--json |
Optional |
aos power awake statusaos power awake status --jsonaos power status
Section titled “aos power status”Print the current power source (ac or battery)
Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works
aos power statusaos power status