mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Feat: start in tray mode
This commit is contained in:
@@ -178,7 +178,10 @@ impl LedSupportFile {
|
||||
info!("Loaded bundled LED support data from {}", bundled.display());
|
||||
return Some(data);
|
||||
} else {
|
||||
warn!("Bundled aura_support.ron present but failed to parse: {}", bundled.display());
|
||||
warn!(
|
||||
"Bundled aura_support.ron present but failed to parse: {}",
|
||||
bundled.display()
|
||||
);
|
||||
}
|
||||
} else {
|
||||
warn!("Does {} exist?", ASUS_LED_MODE_USER_CONF);
|
||||
|
||||
@@ -24,4 +24,6 @@ pub struct CliStart {
|
||||
that might match your laptop"
|
||||
)]
|
||||
pub layout_viewing: bool,
|
||||
#[options(help = "start in tray mode - main window hidden")]
|
||||
pub tray_mode: bool,
|
||||
}
|
||||
|
||||
@@ -140,6 +140,13 @@ async fn main() -> Result<()> {
|
||||
config.startup_in_background = false;
|
||||
config.start_fullscreen = true;
|
||||
}
|
||||
|
||||
if cli_parsed.tray_mode {
|
||||
config.enable_tray_icon = true;
|
||||
config.run_in_background = true;
|
||||
config.startup_in_background = true;
|
||||
}
|
||||
|
||||
config.write();
|
||||
|
||||
let enable_tray_icon = config.enable_tray_icon;
|
||||
|
||||
Reference in New Issue
Block a user