mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
ROGCC: Better control of notifs, add panel_od
This commit is contained in:
@@ -59,6 +59,24 @@ impl<'a> RogApp<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
if supported.rog_bios_ctrl.post_sound {
|
||||
if ui
|
||||
.add(egui::Checkbox::new(
|
||||
&mut states.bios.panel_overdrive,
|
||||
"Panel overdrive",
|
||||
))
|
||||
.changed()
|
||||
{
|
||||
dbus.proxies()
|
||||
.rog_bios()
|
||||
.set_panel_overdrive(states.bios.panel_overdrive)
|
||||
.map_err(|err| {
|
||||
states.error = Some(err.to_string());
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
}
|
||||
|
||||
if supported.rog_bios_ctrl.dedicated_gfx {
|
||||
if ui
|
||||
.add(egui::Checkbox::new(
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
use crate::RogApp;
|
||||
|
||||
impl<'a> RogApp<'a> {
|
||||
@@ -13,32 +15,19 @@ impl<'a> RogApp<'a> {
|
||||
}
|
||||
});
|
||||
ui.menu_button("Settings", |ui| {
|
||||
let (mut in_bg, mut hidden) =
|
||||
{ (config.run_in_background, config.startup_in_background) };
|
||||
if ui.checkbox(&mut in_bg, "Run in Background").clicked() {
|
||||
config.run_in_background = in_bg;
|
||||
config
|
||||
.save()
|
||||
.map_err(|err| {
|
||||
states.error = Some(err.to_string());
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
if ui.checkbox(&mut hidden, "Startup Hidden").clicked() {
|
||||
config.startup_in_background = in_bg;
|
||||
config
|
||||
.save()
|
||||
.map_err(|err| {
|
||||
states.error = Some(err.to_string());
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
if ui
|
||||
.checkbox(&mut config.enable_notifications, "Enable Notifications")
|
||||
.checkbox(&mut config.run_in_background, "Run in Background")
|
||||
.clicked()
|
||||
|| ui
|
||||
.checkbox(&mut config.startup_in_background, "Startup Hidden")
|
||||
.clicked()
|
||||
|| ui
|
||||
.checkbox(&mut config.enable_notifications, "Enable Notifications")
|
||||
.clicked()
|
||||
{
|
||||
config.enable_notifications = in_bg;
|
||||
// TODO: set an atomicbool used in the notif thread
|
||||
states
|
||||
.notifs_enabled
|
||||
.store(config.enable_notifications, Ordering::SeqCst);
|
||||
config
|
||||
.save()
|
||||
.map_err(|err| {
|
||||
|
||||
Reference in New Issue
Block a user