Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for systemd-inhibit idle block inhibits #57

Merged
merged 1 commit into from
May 13, 2024

Conversation

yawor
Copy link
Contributor

@yawor yawor commented May 13, 2024

This PR implements listening for systemd-inhibit idle block inhibits.

For simplicity I've decided that there's no need to retrieve details about inhibitors using ListInhibitors method in org.freedesktop.login1.Manager interface and it's enough to get list of block inhibit types using BlockInhibited property. This property is monitored using PropertyChanged signal. Also the property is read on hypridle start, so if there is already an inhibitor active, then idle is going to be inhibited right away.

This simplification causes that even if there are multiple idle inhibitors active, they're going to be only counted as one in hypridle (it inhibits on first active inhibitor and releases inhibit on deactivation of the last one). To check the list of active inhibitors one can use systemd-inhibit --list command.

I'm respecting ignore_dbus_inhibit setting in the same way the original Dbus ScreenSaver code does.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@vaxerski vaxerski merged commit 50da2e7 into hyprwm:main May 13, 2024
1 check passed
@yawor yawor deleted the systemd-inhibit branch May 14, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants