This MR introduces separate ignore_systemd_inhibit configuration parameter, which controls whether hypridle respects systemd inhibits or not.
Second change is that both ignore_dbus_inhibit and ignore_systemd_inhibit parameters are processed early in CHypridle::setupDBUS(). This means that if ignore_dbus_inhibit is set, then no attempt to register org.freedesktop.ScreenSaver object is made, but hypridle will still respect the systemd.
This gives the ability to use a different daemon which registers this object in parallel to hypridle. One example of such daemon would be https://github.com/bdwalton/inhibit-bridge, which registers its own ScreenSaver object and forwards ScreenSaver inhibits as systemd inhibits. Systemd inhibits are more flexible, as there can be multiple programs monitoring systemd inhibits, but there can be only one program, which registers ScreenSaver object.
I've also added the ability to register multiple ScreenSaver objects under different paths for historic reasons. Originally the ScreenSaver object lived under the /ScreenSaver path. Some browsers seem to still use the legacy path. For now two paths are hardcoded (/org/freedesktop/ScreenSaver and /ScreenSaver), but it could be made in the future so that it is also configurable. This should fix #44.
This MR introduces separate
ignore_systemd_inhibit
configuration parameter, which controls whether hypridle respects systemd inhibits or not.Second change is that both
ignore_dbus_inhibit
andignore_systemd_inhibit
parameters are processed early inCHypridle::setupDBUS()
. This means that ifignore_dbus_inhibit
is set, then no attempt to registerorg.freedesktop.ScreenSaver
object is made, but hypridle will still respect the systemd.This gives the ability to use a different daemon which registers this object in parallel to hypridle. One example of such daemon would be https://github.com/bdwalton/inhibit-bridge, which registers its own
ScreenSaver
object and forwards ScreenSaver inhibits as systemd inhibits. Systemd inhibits are more flexible, as there can be multiple programs monitoring systemd inhibits, but there can be only one program, which registersScreenSaver
object.I've also added the ability to register multiple
ScreenSaver
objects under different paths for historic reasons. Originally theScreenSaver
object lived under the/ScreenSaver
path. Some browsers seem to still use the legacy path. For now two paths are hardcoded (/org/freedesktop/ScreenSaver
and/ScreenSaver
), but it could be made in the future so that it is also configurable. This should fix #44.