feat: add sleep_monitor command with wake-on-input

This commit is contained in:
StaszeKrk 2026-05-05 18:37:11 +02:00
parent 42c02e3dc2
commit a615926156
6 changed files with 51 additions and 1 deletions

View file

@ -168,6 +168,7 @@ bindr=Super,Super_L,spawn,rofi -show run
| `disable_monitor` | `monitor_spec` | Shutdown monitor. Accepts a [monitor spec](/docs/configuration/monitors#monitor-spec-format). |
| `enable_monitor` | `monitor_spec` | Power on monitor. Accepts a [monitor spec](/docs/configuration/monitors#monitor-spec-format). |
| `toggle_monitor` | `monitor_spec` | Toggle monitor power. Accepts a [monitor spec](/docs/configuration/monitors#monitor-spec-format). |
| `sleep_monitor` | `monitor_spec` | Turn off monitor and wake it automatically on the next keypress or mouse movement. Accepts a [monitor spec](/docs/configuration/monitors#monitor-spec-format). |
### Media Controls

View file

@ -67,7 +67,7 @@ monitorrule=name:HEADLESS-.*,width:1920,height:1080,refresh:60,x:1926,y:0,scale:
## Monitor Spec Format
Several commands (`focusmon`, `tagmon`, `disable_monitor`, `enable_monitor`, `toggle_monitor`, `viewcrossmon`, `tagcrossmon`) accept a **monitor_spec** string to identify a monitor.
Several commands (`focusmon`, `tagmon`, `disable_monitor`, `enable_monitor`, `toggle_monitor`, `sleep_monitor`, `viewcrossmon`, `tagcrossmon`) accept a **monitor_spec** string to identify a monitor.
**Format:**
@ -173,6 +173,9 @@ mmsg -d enable_monitor,eDP-1
# Toggle
mmsg -d toggle_monitor,eDP-1
# Turn off and wake automatically on next keypress or mouse movement
mmsg -d sleep_monitor,eDP-1
```
You can also use `wlr-randr` for monitor management: