Why: Adopt local execution path to streamline command handling and reduce RPC overhead. New Features - Enhancements - Replace `gpu::execute` with `gpu::execute_local` in integrated, hybrid, and nvidia command invocations. - Replace `crate::commands::power`, `battery`, `cooling`, and `touchpad` executions with `execute_local`. - Remove the unused `LAPCTL_DAEMON_INTERNAL` environment variable setting. Bug Fixes - None
20 lines
500 B
Rust
20 lines
500 B
Rust
use log::info;
|
|
use std::error::Error;
|
|
use zbus::connection::Builder;
|
|
|
|
mod dbus_iface;
|
|
|
|
pub async fn run() -> Result<(), Box<dyn Error>> {
|
|
info!("Starting lapctld daemon...");
|
|
let _connection = Builder::system()?
|
|
.name("org.lapctl")?
|
|
.serve_at("/org/lapctl", dbus_iface::LapctlInterface::default())?
|
|
.build()
|
|
.await?;
|
|
|
|
info!("Daemon is running on the system bus.");
|
|
loop {
|
|
tokio::time::sleep(std::time::Duration::from_secs(3600)).await;
|
|
}
|
|
}
|