battery: More work on brightness handling

This commit is contained in:
Ian Douglas Scott 2022-06-21 16:04:39 -07:00
parent 89f82fd829
commit ed42b4c71e
2 changed files with 29 additions and 3 deletions

View file

@ -1,7 +1,7 @@
use futures::prelude::*;
use gtk4::{glib, prelude::*};
use relm4::{ComponentParts, ComponentSender, RelmApp, SimpleComponent, WidgetPlus};
use std::time::Duration;
use std::{process::Command, time::Duration};
mod backlight;
mod upower;
@ -164,6 +164,11 @@ impl SimpleComponent for AppModel {
gtk4::Button {
set_label: "Power Settings...",
connect_clicked => move |_| {
// XXX open subpanel
let _ = Command::new("cosmic-settings").spawn();
// TODO hide
}
}
}
}