511 B
511 B
A program to toggle the power state of all displays in sway.
This program will:
- Enumerate all enabled displays
- If
off
oron
isn't manually provided, determine if displays are mostly on or off - Toggle displays to the opposite state
Mostly only useful if combined with an idle daemon like swayidle, or when assigned to a keybinding.
Usage:
# toggle all outputs
sway-powertoggle
# turn off displays that are on
sway-powertoggle off
# turn on displays that are off
sway-powertoggle on