Skip to content

Commit

Permalink
Merge pull request #23 from mrcjkb/cli-reload-profiles
Browse files Browse the repository at this point in the history
fix(tailor-cli): reload profiles after setting
  • Loading branch information
AaronErhardt authored Sep 26, 2023
2 parents a1338db + 216eb56 commit a77a9f6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tailor_cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tailor"
version = "0.2.1"
version = "0.2.2"
authors = [
"Aaron Erhardt <[email protected]>",
"Marc Jakobi <[email protected]>"
Expand Down
12 changes: 11 additions & 1 deletion tailor_cli/src/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ 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<String> = connection.list_global_profiles().await?;
Expand All @@ -36,6 +43,9 @@ 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)
}
Expand Down
2 changes: 1 addition & 1 deletion tailor_gui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tailor_gui"
version = "0.2.0"
version = "0.2.2"
authors = ["Aaron Erhardt <[email protected]>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion tailord/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tailord"
authors = ["Aaron Erhardt <[email protected]>"]
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)"
Expand Down

0 comments on commit a77a9f6

Please sign in to comment.