mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Further improve the daemon controller pattern and reduce cloned code
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
use notify_rust::{Hint, Notification, NotificationHandle};
|
||||
use rog_aura::AuraEffect;
|
||||
use rog_dbus::{
|
||||
zbus_anime::AnimeProxy, zbus_charge::ChargeProxy, zbus_led::LedProxy,
|
||||
zbus_platform::RogBiosProxy, zbus_profile::ProfileProxy,
|
||||
zbus_anime::AnimeProxy, zbus_led::LedProxy, zbus_platform::RogBiosProxy,
|
||||
zbus_power::PowerProxy, zbus_profile::ProfileProxy,
|
||||
};
|
||||
use rog_profiles::Profile;
|
||||
use smol::{future, Executor};
|
||||
@@ -102,7 +102,7 @@ pub fn start_notifications(
|
||||
executor
|
||||
.spawn(async move {
|
||||
let conn = zbus::Connection::system().await.unwrap();
|
||||
let proxy = ChargeProxy::new(&conn).await.unwrap();
|
||||
let proxy = PowerProxy::new(&conn).await.unwrap();
|
||||
if let Ok(p) = proxy.receive_notify_charge_control_end_threshold().await {
|
||||
p.for_each(|e| {
|
||||
if let Ok(out) = e.args() {
|
||||
|
||||
Reference in New Issue
Block a user