hyprwm / hypridle

Hyprland's idle daemon
BSD 3-Clause "New" or "Revised" License
320 stars 16 forks source link

Reset timers after inhibitor has been taken off if idled #72

Closed Elvyria closed 2 weeks ago

Elvyria commented 2 weeks ago

This addresses #26. Got annoyed with monitor staying on after video is over. It would be better to use idle-inhibit-unstable-v1 with a fake surface and let Hyprland just reset and halt timers, but I'm not writing that. The conditions shouldn't trigger too often anyways, so with <10 hooks on average it should be harmless.

Tested for about 2 days, but I don't do c++ and wayland-proto, so check for sanity please. If you don't like that copy-paste and want me to create clean methods for clearing notifications and re-registering them separately, do tell. (and if someone manages to hot-reload config in an idle state, that's on them)