From 42b2882fbe255c3c26505ea9386d75cf83750ad8 Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Sun, 24 Sep 2023 13:03:47 +0200 Subject: [PATCH] fix(tailor-cli): reload profiles after setting --- Cargo.lock | 4 ++-- tailor_cli/Cargo.toml | 2 +- tailor_cli/src/profile.rs | 6 +++++- tailor_gui/Cargo.toml | 2 +- tailord/Cargo.toml | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 27e16e1..b416375 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1297,7 +1297,7 @@ dependencies = [ [[package]] name = "tailor" -version = "0.2.1" +version = "0.2.2" dependencies = [ "clap", "clap_complete", @@ -1331,7 +1331,7 @@ dependencies = [ [[package]] name = "tailord" -version = "0.2.1" +version = "0.2.2" dependencies = [ "futures", "futures-lite", diff --git a/tailor_cli/Cargo.toml b/tailor_cli/Cargo.toml index 7eb8b3f..f6af323 100644 --- a/tailor_cli/Cargo.toml +++ b/tailor_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tailor" -version = "0.2.1" +version = "0.2.2" authors = [ "Aaron Erhardt ", "Marc Jakobi " diff --git a/tailor_cli/src/profile.rs b/tailor_cli/src/profile.rs index 47a15c4..650ba66 100644 --- a/tailor_cli/src/profile.rs +++ b/tailor_cli/src/profile.rs @@ -20,7 +20,10 @@ pub(crate) async fn handle(cmd: ProfileCommand) -> Result<()> { let active_profile_str = format!("{} (active)", active_profile).bold().green(); println!("{}\n{}", active_profile_str, inactive_profiles.join("\n")); } - ProfileCommand::Set { name } => connection.set_active_global_profile_name(&name).await?, + ProfileCommand::Set { name } => { + connection.set_active_global_profile_name(&name).await?; + connection.reload().await?; + } ProfileCommand::Cycle { verbose, notify } => { let active_profile = connection.get_active_global_profile_name().await?; let profiles: Vec = connection.list_global_profiles().await?; @@ -36,6 +39,7 @@ pub(crate) async fn handle(cmd: ProfileCommand) -> Result<()> { connection .set_active_global_profile_name(next_profile_name) .await?; + connection.reload().await?; if verbose { println!("{}", profile_updated_msg) } diff --git a/tailor_gui/Cargo.toml b/tailor_gui/Cargo.toml index 910c5db..5520b44 100644 --- a/tailor_gui/Cargo.toml +++ b/tailor_gui/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tailor_gui" -version = "0.2.0" +version = "0.2.2" authors = ["Aaron Erhardt "] edition = "2021" publish = false diff --git a/tailord/Cargo.toml b/tailord/Cargo.toml index 48c8407..95ad982 100644 --- a/tailord/Cargo.toml +++ b/tailord/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tailord" authors = ["Aaron Erhardt "] -version = "0.2.1" +version = "0.2.2" edition = "2021" license = "GPL-2.0+" description = "Daemon handling fan, keyboard and general HW support for Tuxedo laptops (part of tuxedo-rs)"