mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Fix slash enable
This commit is contained in:
@@ -575,6 +575,7 @@ fn handle_slash(cmd: &SlashCommand) -> Result<(), Box<dyn std::error::Error>> {
|
||||
&& cmd.show_on_sleep.is_none()
|
||||
&& cmd.show_on_battery.is_none()
|
||||
&& cmd.show_battery_warning.is_none()
|
||||
// && cmd.show_on_lid_closed.is_none()
|
||||
&& cmd.mode.is_none()
|
||||
&& !cmd.list
|
||||
&& !cmd.enable
|
||||
@@ -620,6 +621,9 @@ fn handle_slash(cmd: &SlashCommand) -> Result<(), Box<dyn std::error::Error>> {
|
||||
if let Some(show) = cmd.show_battery_warning {
|
||||
proxy.set_show_battery_warning(show)?;
|
||||
}
|
||||
// if let Some(show) = cmd.show_on_lid_closed {
|
||||
// proxy.set_show_on_lid_closed(show)?;
|
||||
// }
|
||||
}
|
||||
if cmd.list {
|
||||
let res = SlashMode::list();
|
||||
|
||||
@@ -26,6 +26,8 @@ pub struct SlashCommand {
|
||||
pub show_on_sleep: Option<bool>,
|
||||
#[options(short = "b", meta = "", help = "Show the animation on battery")]
|
||||
pub show_on_battery: Option<bool>,
|
||||
// #[options(short = "L", meta = "", help = "Show the animation on lid closed")]
|
||||
// pub show_on_lid_closed: Option<bool>,
|
||||
#[options(
|
||||
short = "w",
|
||||
meta = "",
|
||||
|
||||
Reference in New Issue
Block a user