Skip to content

feat: add sleep_monitor command with wake-on-input#893

Open
StaszeKrk wants to merge 2 commits into
mangowm:mainfrom
StaszeKrk:feat/sleep-monitor
Open

feat: add sleep_monitor command with wake-on-input#893
StaszeKrk wants to merge 2 commits into
mangowm:mainfrom
StaszeKrk:feat/sleep-monitor

Conversation

@StaszeKrk
Copy link
Copy Markdown

Closes #780.

Adds a sleep_monitor command that turns off a specific monitor and
automatically re-enables it on the next keypress or mouse movement.

Unlike disable_monitor, no explicit enable_monitor call is needed — the
monitor wakes itself on any input event.

Usage:
sleep_monitor,eDP-1

Implementation:

  • Adds wake_on_input flag to struct Monitor
  • sleep_monitor() disables the output and sets the flag
  • wakesleepingmons() is called in keypress, buttonpress, and motionnotify
    to re-enable any flagged monitors on the next real input event

@DreamMaoMao
Copy link
Copy Markdown
Collaborator

I think the code for disabling monitor can be reused. Just need a option

@StaszeKrk StaszeKrk force-pushed the feat/sleep-monitor branch from 332657a to 8334a5f Compare May 11, 2026 05:59
@DreamMaoMao DreamMaoMao force-pushed the main branch 3 times, most recently from c009ba2 to f328c27 Compare May 20, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Turn display on with mouse move/keypress

2 participants