mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Update readme, slash configs
This commit is contained in:
@@ -5,7 +5,7 @@ use log::{error, warn};
|
||||
use logind_zbus::manager::ManagerProxy;
|
||||
use rog_anime::usb::{
|
||||
pkt_set_brightness, pkt_set_builtin_animations, pkt_set_enable_display,
|
||||
pkt_set_enable_powersave_anim, Brightness,
|
||||
pkt_set_enable_powersave_anim, Brightness
|
||||
};
|
||||
use rog_anime::{Animations, AnimeDataBuffer, DeviceState};
|
||||
use zbus::object_server::SignalEmitter;
|
||||
@@ -41,7 +41,7 @@ impl AniMeZbus {
|
||||
pub async fn start_tasks(
|
||||
mut self,
|
||||
connection: &Connection,
|
||||
path: OwnedObjectPath,
|
||||
path: OwnedObjectPath
|
||||
) -> Result<(), RogError> {
|
||||
// let task = zbus.clone();
|
||||
self.reload()
|
||||
@@ -166,10 +166,7 @@ impl AniMeZbus {
|
||||
async fn set_builtin_animations(&self, settings: Animations) {
|
||||
self.0
|
||||
.write_bytes(&pkt_set_builtin_animations(
|
||||
settings.boot,
|
||||
settings.awake,
|
||||
settings.sleep,
|
||||
settings.shutdown,
|
||||
settings.boot, settings.awake, settings.sleep, settings.shutdown
|
||||
))
|
||||
.await
|
||||
.map_err(|err| {
|
||||
@@ -319,7 +316,7 @@ impl crate::CtrlTask for AniMeZbus {
|
||||
|
||||
inner
|
||||
.write_bytes(&pkt_set_enable_display(
|
||||
!(sleeping && config.off_when_suspended),
|
||||
!(sleeping && config.off_when_suspended)
|
||||
))
|
||||
.await
|
||||
.map_err(|err| {
|
||||
@@ -330,7 +327,7 @@ impl crate::CtrlTask for AniMeZbus {
|
||||
if config.builtin_anims_enabled {
|
||||
inner
|
||||
.write_bytes(&pkt_set_enable_powersave_anim(
|
||||
!(sleeping && config.off_when_suspended),
|
||||
!(sleeping && config.off_when_suspended)
|
||||
))
|
||||
.await
|
||||
.map_err(|err| {
|
||||
@@ -433,7 +430,7 @@ impl crate::CtrlTask for AniMeZbus {
|
||||
.ok();
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
.await;
|
||||
|
||||
@@ -449,10 +446,7 @@ impl crate::Reloadable for AniMeZbus {
|
||||
if config.builtin_anims_enabled {
|
||||
self.0
|
||||
.write_bytes(&pkt_set_builtin_animations(
|
||||
anim.boot,
|
||||
anim.awake,
|
||||
anim.sleep,
|
||||
anim.shutdown,
|
||||
anim.boot, anim.awake, anim.sleep, anim.shutdown
|
||||
))
|
||||
.await?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user