Support unlock from logind dbus
This commit is contained in:
parent
e9b5524992
commit
349c009321
2 changed files with 6 additions and 8 deletions
|
|
@ -63,8 +63,10 @@ pub async fn handler(msg_tx: &mut mpsc::Sender<bool>) -> Result<(), Box<dyn Erro
|
|||
loop {
|
||||
// Waits until lock or unlock signals have been received
|
||||
tokio::select!(_ = lock.next() => {
|
||||
log::info!("logind lock");
|
||||
msg_tx.send(true).await?;
|
||||
}, _ = unlock.next() => {
|
||||
log::info!("logind unlock");
|
||||
msg_tx.send(false).await?;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue