swaywm / swayidle

Idle management daemon for Wayland
MIT License
550 stars 50 forks source link

No option to activate idle mode immediately #174

Closed hramrach closed 1 month ago

hramrach commented 1 month ago

While on X11 it is possible to trigger the idle state by a command wayidle does not have this option.

kennylevinsen commented 1 month ago

Maybe link to the documentation of the command you're thinking of?

hramrach commented 1 month ago

At least xscreensaver has the server/client model where the screensaver is running in the background and activates either with the timeout or with the client sending a command. This is useful for not duplication the functionality of the screensaver elsewhere.

swayidle has the server part but I see no way to activate the commands that are set to activate after a timeout.

Given that unlike X11 there is no automated way for the screen to activate again once deactivated other than the swayidle resume action the integration is even more critical. Blanking the screen without telling swayidle it's blanked will leave the screen stuck blanked.

kennylevinsen commented 1 month ago

From the swayidle manual:

SIGNALS
       swayidle responds to the following signals:

       SIGTERM, SIGINT
           Run all pending resume commands. When finished swayidle will terminate.

       SIGUSR1
           Immediately enter idle state.

killall -USR1 swayidle will do what you want.

hramrach commented 1 month ago

Indeed, was probably looking at the wrong page.

It would be nicer and less confusing if this was a named option rather than SIGUSR1 but I suppose that will need to wait until you run out of signals.