1
0
Fork 0
forked from wry/wry

Add clean-logs-older-than option

This commit is contained in:
khyperia 2026-03-27 07:44:34 +01:00 committed by Julian Orth
parent 4c7d108e09
commit 880c98ecfb
17 changed files with 360 additions and 10 deletions

View file

@ -86,7 +86,7 @@ use {
hash::Hash,
ops::Deref,
rc::{Rc, Weak},
time::Duration,
time::{Duration, SystemTime},
},
thiserror::Error,
uapi::{OwnedFd, c, fcntl_dupfd_cloexec},
@ -1856,6 +1856,10 @@ impl ConfigProxyHandler {
self.state.set_log_level(level.into());
}
fn handle_clean_logs_older_than(&self, time: SystemTime) {
self.state.clean_logs_older_than.set(Some(time));
}
fn handle_grab(&self, kb: InputDevice, grab: bool) -> Result<(), CphError> {
let kb = self.get_kb(kb)?;
kb.grab(grab);
@ -3376,6 +3380,7 @@ impl ConfigProxyHandler {
ClientMessage::GetConnectorByName { name } => self.handle_get_connector_by_name(name),
ClientMessage::CreateVirtualOutput { name } => self.handle_create_virtual_output(name),
ClientMessage::RemoveVirtualOutput { name } => self.handle_remove_virtual_output(name),
ClientMessage::CleanLogsOlderThan { time } => self.handle_clean_logs_older_than(time),
}
Ok(())
}