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