regolith-linux / regolith-powerd

Daemon to sync gsd power settings with Regolith on Wayland. Provides idle state functionality and sets power button action
1 stars 1 forks source link

feat: prevent logind actions for power key and lid #6

Closed SoumyaRanjanPatnaik closed 5 months ago

SoumyaRanjanPatnaik commented 5 months ago

This commit introduces support for inhibiting logind's default actions for power key press and lid close events. It adds a new module "logind.rs" which contains the necessary code to interact with logind using the zbus library. The main function is updated to setup logind inhibits when the application starts. To support these changes, zbus is added as a dependency to Cargo.toml and Cargo.lock. The debian control files are also updated to remove the logind-ignore-lidswitch and logind-ignore-powerkey packages as they are no longer required.

REFERENCE: https://www.freedesktop.org/wiki/Software/systemd/inhibit/