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:
parent
dddf51b441
commit
821b431973
4 changed files with 8 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue