feat: separate logind feature from systemd

Move logind-zbus to a dedicated 'logind' feature that is independent
of the 'systemd' feature. This allows non-systemd users (e.g., OpenRC
with elogind) to access lid switch inhibition and lid status detection
without requiring the full systemd stack.

The 'systemd' feature now depends on 'logind' to maintain backward
compatibility, so existing users are unaffected.

Feature configuration:
- default: ["systemd"]
- logind: ["logind-zbus"]
- systemd: ["libsystemd", "logind", "tracing-journald"]

Resolves #2473

Coding-Agent: OpenCode
Model: claude-sonnet-4-5
This commit is contained in:
Anthony T. Lannutti 2026-06-15 00:30:35 -05:00 committed by Jacob Kauffmann
parent dddf51b441
commit 821b431973
4 changed files with 8 additions and 7 deletions

View file

@ -1600,7 +1600,7 @@ impl State {
}
InputEvent::Special(_) => {}
InputEvent::SwitchToggle { event } => {
#[cfg(feature = "systemd")]
#[cfg(feature = "logind")]
if event.switch() == Some(Switch::Lid) && self.common.inhibit_lid_fd.is_some() {
let backend = self.backend.lock();
let output = backend