swaywm/swayidle

Postpone resuming after wake up

knezi opened this issue · 0 comments

knezi commented

Not sure if this is desirable, but when using:

swayidle -w timeout 180 'swaymsg "output * dpms off"' \
                   resume 'swaymsg "output * dpms on"'`

and the laptop is idle, when you hit the sleep button or close the lid, swayidle resumes before going to sleep. This results in a blink of the screen.

Another use case is for tracking non-idle time: I have a simple script for timer, which is paused/resumed on swayidle events. When I close the lid, the timer is started.

Enhancement:

postpone resuming after waking up if the event causing resume causes sleep as well.