mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
adds support to enable/disable side leds
This commit is contained in:
@@ -59,6 +59,11 @@ pub struct LedModeCommand {
|
||||
help = "set the keyboard LED suspend animation to enabled while the device is suspended"
|
||||
)]
|
||||
pub sleep_enable: Option<bool>,
|
||||
#[options(
|
||||
meta = "",
|
||||
help = "set the keyboard side LEDs to enabled"
|
||||
)]
|
||||
pub side_leds_enable: Option<bool>,
|
||||
#[options(command)]
|
||||
pub command: Option<SetAuraBuiltin>,
|
||||
}
|
||||
|
||||
@@ -344,6 +344,7 @@ fn handle_led_mode(
|
||||
&& !mode.next_mode
|
||||
&& mode.sleep_enable.is_none()
|
||||
&& mode.awake_enable.is_none()
|
||||
&& mode.side_leds_enable.is_none()
|
||||
{
|
||||
if !mode.help {
|
||||
println!("Missing arg or command\n");
|
||||
@@ -407,6 +408,10 @@ fn handle_led_mode(
|
||||
dbus.proxies().led().set_sleep_enabled(enable)?;
|
||||
}
|
||||
|
||||
if let Some(enable) = mode.side_leds_enable {
|
||||
dbus.proxies().led().set_side_leds_enabled(enable)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user