mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Fix: ROGCC: show option for LED notifications
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -2605,7 +2605,6 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"nix 0.26.1",
|
"nix 0.26.1",
|
||||||
"notify-rust",
|
"notify-rust",
|
||||||
"once_cell",
|
|
||||||
"png_pong",
|
"png_pong",
|
||||||
"rog_anime",
|
"rog_anime",
|
||||||
"rog_aura",
|
"rog_aura",
|
||||||
|
|||||||
@@ -40,5 +40,3 @@ png_pong.workspace = true
|
|||||||
|
|
||||||
nix = "^0.26.1"
|
nix = "^0.26.1"
|
||||||
tempfile = "3.3.0"
|
tempfile = "3.3.0"
|
||||||
|
|
||||||
once_cell = "1.10.0"
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ impl Default for EnabledNotifications {
|
|||||||
receive_notify_charge_control_end_threshold: true,
|
receive_notify_charge_control_end_threshold: true,
|
||||||
receive_notify_mains_online: false,
|
receive_notify_mains_online: false,
|
||||||
receive_notify_profile: true,
|
receive_notify_profile: true,
|
||||||
receive_notify_led: false,
|
receive_notify_led: true,
|
||||||
receive_power_states: false,
|
receive_power_states: false,
|
||||||
receive_notify_gfx: false,
|
receive_notify_gfx: false,
|
||||||
receive_notify_gfx_status: false,
|
receive_notify_gfx_status: false,
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ pub fn app_settings(config: &mut Config, states: &mut SystemState, ui: &mut Ui)
|
|||||||
Default::default()
|
Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
if ui
|
ui.label("Application settings");
|
||||||
|
let app_changed = ui
|
||||||
.checkbox(&mut config.run_in_background, "Run in Background")
|
.checkbox(&mut config.run_in_background, "Run in Background")
|
||||||
.clicked()
|
.clicked()
|
||||||
|| ui
|
|| ui
|
||||||
@@ -23,11 +24,19 @@ pub fn app_settings(config: &mut Config, states: &mut SystemState, ui: &mut Ui)
|
|||||||
&mut enabled_notifications.all_enabled,
|
&mut enabled_notifications.all_enabled,
|
||||||
"Enable Notifications",
|
"Enable Notifications",
|
||||||
)
|
)
|
||||||
.clicked()
|
.clicked();
|
||||||
|
|
||||||
|
ui.label("Notification settings");
|
||||||
|
let notif_changed = ui
|
||||||
|
.checkbox(
|
||||||
|
&mut enabled_notifications.receive_notify_gfx_status,
|
||||||
|
"Enable dGPU status notification",
|
||||||
|
)
|
||||||
|
.clicked()
|
||||||
|| ui
|
|| ui
|
||||||
.checkbox(
|
.checkbox(
|
||||||
&mut enabled_notifications.receive_notify_gfx_status,
|
&mut enabled_notifications.receive_notify_led,
|
||||||
"Enable dGPU status notification",
|
"Enable LED mode change notification",
|
||||||
)
|
)
|
||||||
.clicked()
|
.clicked()
|
||||||
|| ui
|
|| ui
|
||||||
@@ -71,8 +80,9 @@ pub fn app_settings(config: &mut Config, states: &mut SystemState, ui: &mut Ui)
|
|||||||
&mut enabled_notifications.receive_notify_post_boot_sound,
|
&mut enabled_notifications.receive_notify_post_boot_sound,
|
||||||
"Enable BIOS post sound notification",
|
"Enable BIOS post sound notification",
|
||||||
)
|
)
|
||||||
.clicked()
|
.clicked();
|
||||||
{
|
|
||||||
|
if app_changed || notif_changed {
|
||||||
if let Ok(mut lock) = states.enabled_notifications.lock() {
|
if let Ok(mut lock) = states.enabled_notifications.lock() {
|
||||||
// Replace inner content before save
|
// Replace inner content before save
|
||||||
*lock = enabled_notifications;
|
*lock = enabled_notifications;
|
||||||
|
|||||||
Reference in New Issue
Block a user