swaywm/swayidle

RFC: Only execute `resume` command of `timeout` event if `timeout` command succeeds

sammko opened this issue · 0 comments

For example, it would be nice if resume did not get executed in the following case:

swayidle timeout 1 'exit 1' resume 'echo resume'

My usecase is checking if swaylock is running in the timeout command (using pgrep or such) to run dpms off. However, running dpms on in the resume clause unconditionally causes frame drops during normal usage and I find duplicating the conditional suboptimal.