mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Bugfixes to session handler. Add extra profile commands
- Better handling of session tracking - List all profile data - Get active profile name - Get active profile data
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "asusctl"
|
||||
version = "3.1.4"
|
||||
version = "3.1.5"
|
||||
authors = ["Luke D Jones <luke@ljones.dev>"]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -389,6 +389,9 @@ fn handle_profile(
|
||||
if !cmd.next
|
||||
&& !cmd.create
|
||||
&& !cmd.list
|
||||
&& !cmd.active_name
|
||||
&& !cmd.active_data
|
||||
&& !cmd.profiles_data
|
||||
&& cmd.remove.is_none()
|
||||
&& cmd.curve.is_none()
|
||||
&& cmd.max_percentage.is_none()
|
||||
@@ -419,12 +422,31 @@ fn handle_profile(
|
||||
|
||||
if cmd.next {
|
||||
dbus.proxies().profile().next_fan()?;
|
||||
} else if cmd.list {
|
||||
let profile_names = dbus.proxies().profile().profile_names()?;
|
||||
println!("Available profiles are {}", profile_names);
|
||||
} else if let Some(profile) = &cmd.remove {
|
||||
}
|
||||
if let Some(profile) = &cmd.remove {
|
||||
dbus.proxies().profile().remove(profile)?
|
||||
} else {
|
||||
}
|
||||
if cmd.list {
|
||||
let profile_names = dbus.proxies().profile().profile_names()?;
|
||||
println!("Available profiles are {:?}", profile_names);
|
||||
}
|
||||
if cmd.active_name {
|
||||
println!("Active profile: {:?}", dbus.proxies().profile().active_profile_name()?);
|
||||
}
|
||||
if cmd.active_data {
|
||||
println!("Active profile:");
|
||||
for s in dbus.proxies().profile().active_profile_data()?.lines() {
|
||||
println!("{}", s);
|
||||
}
|
||||
}
|
||||
if cmd.profiles_data {
|
||||
println!("Profiles:");
|
||||
for s in dbus.proxies().profile().all_profile_data()?.lines() {
|
||||
println!("{}", s);
|
||||
}
|
||||
}
|
||||
|
||||
if cmd.profile.is_some() {
|
||||
dbus.proxies()
|
||||
.profile()
|
||||
.write_command(&ProfileEvent::Cli(cmd.clone()))?
|
||||
|
||||
Reference in New Issue
Block a user