swaywm / swayidle

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

loop timeout events #150

Closed UltraBlackLinux closed 1 year ago

UltraBlackLinux commented 1 year ago

I'd really appreciate an option to loop timeout events. Currently I have to do things like swayidle timeout 10 script.sh resume script2.sh timeout 20 script.sh resume script2.sh which is really clumsy and annoying. could you improve this?

kennylevinsen commented 1 year ago

Moved to swayidle.

You'd have to specify a use-case that would be reasonable for swayidle to cover.

You can just have one timeout that start a process that loops indefinitely on its own, and a resume that kills it.

UltraBlackLinux commented 1 year ago

Moved to swayidle.

Oh I'm so sorry. I mixed up the repos

You can just have one timeout that start a process that loops indefinitely on its own, and a resume that kills it.

That actually seems like a pretty reasonable solution. I didn't even think of that, thanks!