hyprwm / hypridle

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

[Feature]: Add APIs to query the inhibitor status of hypridle #71

Open cunbidun opened 5 months ago

cunbidun commented 5 months ago

I've been using hypridle and it's been great. However, sometimes it's hard to figure out what's preventing hypridle from working as expected (often due to user error). It would be nice if hypridle could expose some kind of API (file-based or socket-based) so users can query what the current inhibitors are.

Thank you very much!

yawor commented 5 months ago

Not everything can be reported that way. Hypridle only stores the number of inhibitors, not what they are. To return details about the inhibitors that part of hypridle would need to be totally rewritten.

Also for wayland's experimental idle inhibit protocol inhibitors (like the idle inhibit button on waybar), hypridle knows nothing about them. In this case the inhibiting programs talk directly to the compositor (for example hyprland) and that protocol doesn't provide any methods to retrieve the state of the inhibition. Hypridle doesn't know anything about such inhibitors at all, it just stops receiving idle events from the compositor as long as the wayland idle inhibit is active.