mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Merge branch 'feature/dbus-profile-name' into 'next'
✨ Add ActiveProfileName() dbus method returning name of current profile See merge request asus-linux/asus-nb-ctrl!5
This commit is contained in:
@@ -45,6 +45,16 @@ impl DbusFanAndCpu {
|
||||
}
|
||||
}
|
||||
|
||||
fn active_profile_name(&mut self) -> String {
|
||||
if let Ok(ctrl) = self.inner.try_lock() {
|
||||
if let Ok(mut cfg) = ctrl.config.try_lock() {
|
||||
cfg.read();
|
||||
return cfg.active_profile.clone();
|
||||
}
|
||||
}
|
||||
"Failed".to_string()
|
||||
}
|
||||
|
||||
fn profile(&mut self) -> String {
|
||||
if let Ok(ctrl) = self.inner.try_lock() {
|
||||
if let Ok(mut cfg) = ctrl.config.try_lock() {
|
||||
|
||||
Reference in New Issue
Block a user