mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Version bump. Add early-error display
This commit is contained in:
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- `rog-control-center` has now been moved in to the main workspace due to
|
- `rog-control-center` has now been moved in to the main workspace due to
|
||||||
the heavy dependencies on most of the rog crates
|
the heavy dependencies on most of the rog crates
|
||||||
- Preliminary support of TUF RGB keyboards + power states
|
- Preliminary support of TUF RGB keyboards + power states
|
||||||
|
- Support for G713RW LED modes (Author: jarvis2709)
|
||||||
|
- Support for G713IC LED modes
|
||||||
|
### Changed
|
||||||
|
- The udev rules have been changed to make asusd load with all gamer variants when asus-nb-wmi is loaded
|
||||||
|
- TUF, ROG, Zephyrus, Strix
|
||||||
|
|
||||||
## [4.3.0] - 2022-07-21
|
## [4.3.0] - 2022-07-21
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -89,7 +89,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "asusctl"
|
name = "asusctl"
|
||||||
version = "4.3.0"
|
version = "4.3.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"daemon",
|
"daemon",
|
||||||
"gif",
|
"gif",
|
||||||
@@ -542,7 +542,7 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "daemon"
|
name = "daemon"
|
||||||
version = "4.3.2"
|
version = "4.3.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
@@ -1953,7 +1953,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog-control-center"
|
name = "rog-control-center"
|
||||||
version = "0.1.4"
|
version = "1.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dirs 3.0.2",
|
"dirs 3.0.2",
|
||||||
"eframe",
|
"eframe",
|
||||||
@@ -1992,7 +1992,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_aura"
|
name = "rog_aura"
|
||||||
version = "1.2.1"
|
version = "1.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "asusctl"
|
name = "asusctl"
|
||||||
version = "4.3.0"
|
version = "4.3.3"
|
||||||
authors = ["Luke D Jones <luke@ljones.dev>"]
|
authors = ["Luke D Jones <luke@ljones.dev>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "daemon"
|
name = "daemon"
|
||||||
version = "4.3.2"
|
version = "4.3.3"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = ["Luke <luke@ljones.dev>"]
|
authors = ["Luke <luke@ljones.dev>"]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rog_aura"
|
name = "rog_aura"
|
||||||
version = "1.2.1"
|
version = "1.2.2"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = ["Luke <luke@ljones.dev>"]
|
authors = ["Luke <luke@ljones.dev>"]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rog-control-center"
|
name = "rog-control-center"
|
||||||
version = "0.1.4"
|
version = "1.0.0"
|
||||||
authors = ["Luke D. Jones <luke@ljones.dev>"]
|
authors = ["Luke D. Jones <luke@ljones.dev>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ pub mod mocking;
|
|||||||
pub mod notify;
|
pub mod notify;
|
||||||
pub mod page_states;
|
pub mod page_states;
|
||||||
pub mod pages;
|
pub mod pages;
|
||||||
|
pub mod startup_error;
|
||||||
pub mod widgets;
|
pub mod widgets;
|
||||||
|
|
||||||
#[cfg(feature = "mocking")]
|
#[cfg(feature = "mocking")]
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
use rog_aura::layouts::KeyLayout;
|
use rog_aura::layouts::KeyLayout;
|
||||||
use rog_control_center::{
|
use rog_control_center::{
|
||||||
config::Config, get_ipc_file, notify::start_notifications, on_tmp_dir_exists,
|
config::Config, get_ipc_file, notify::start_notifications, on_tmp_dir_exists,
|
||||||
page_states::PageDataStates, RogApp, RogDbusClientBlocking, SHOW_GUI,
|
page_states::PageDataStates, startup_error::AppErrorShow, RogApp, RogDbusClientBlocking,
|
||||||
|
SHOW_GUI,
|
||||||
};
|
};
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
@@ -23,6 +24,24 @@ const DATA_DIR: &str = env!("CARGO_MANIFEST_DIR");
|
|||||||
const BOARD_NAME: &str = "/sys/class/dmi/id/board_name";
|
const BOARD_NAME: &str = "/sys/class/dmi/id/board_name";
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
let native_options = eframe::NativeOptions {
|
||||||
|
decorated: false,
|
||||||
|
transparent: false,
|
||||||
|
min_window_size: Some(egui::vec2(840.0, 600.0)),
|
||||||
|
max_window_size: Some(egui::vec2(840.0, 600.0)),
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
|
||||||
|
let (dbus, _) = RogDbusClientBlocking::new()
|
||||||
|
.map_err(|e| {
|
||||||
|
eframe::run_native(
|
||||||
|
"ROG Control Center",
|
||||||
|
native_options.clone(),
|
||||||
|
Box::new(move |_| Box::new(AppErrorShow::new(e.to_string()))),
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
// Startup
|
// Startup
|
||||||
let mut config = Config::load()?;
|
let mut config = Config::load()?;
|
||||||
let start_closed = config.startup_in_background;
|
let start_closed = config.startup_in_background;
|
||||||
@@ -76,8 +95,18 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
let notifs_enabled = Arc::new(AtomicBool::new(config.enable_notifications));
|
let notifs_enabled = Arc::new(AtomicBool::new(config.enable_notifications));
|
||||||
|
|
||||||
let states = {
|
let states = {
|
||||||
let (dbus, _) = RogDbusClientBlocking::new()?;
|
let supported = dbus
|
||||||
let supported = dbus.proxies().supported().supported_functions().unwrap();
|
.proxies()
|
||||||
|
.supported()
|
||||||
|
.supported_functions()
|
||||||
|
.map_err(|e| {
|
||||||
|
eframe::run_native(
|
||||||
|
"ROG Control Center",
|
||||||
|
native_options.clone(),
|
||||||
|
Box::new(move |_| Box::new(AppErrorShow::new(e.to_string()))),
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.unwrap();
|
||||||
PageDataStates::new(
|
PageDataStates::new(
|
||||||
layout,
|
layout,
|
||||||
notifs_enabled.clone(),
|
notifs_enabled.clone(),
|
||||||
@@ -114,14 +143,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
Err(_) => on_tmp_dir_exists().unwrap(),
|
Err(_) => on_tmp_dir_exists().unwrap(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let native_options = eframe::NativeOptions {
|
|
||||||
decorated: false,
|
|
||||||
transparent: false,
|
|
||||||
min_window_size: Some(egui::vec2(840.0, 600.0)),
|
|
||||||
max_window_size: Some(egui::vec2(840.0, 600.0)),
|
|
||||||
..Default::default()
|
|
||||||
};
|
|
||||||
|
|
||||||
let should_show_gui = Arc::new(AtomicBool::new(!start_closed));
|
let should_show_gui = Arc::new(AtomicBool::new(!start_closed));
|
||||||
let should = should_show_gui.clone();
|
let should = should_show_gui.clone();
|
||||||
spawn(move || {
|
spawn(move || {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ impl<'a> RogApp<'a> {
|
|||||||
egui::ScrollArea::vertical().show(ui, |ui| {
|
egui::ScrollArea::vertical().show(ui, |ui| {
|
||||||
ui.spacing_mut().item_spacing = egui::vec2(8.0, 10.0);
|
ui.spacing_mut().item_spacing = egui::vec2(8.0, 10.0);
|
||||||
let rect = ui.available_rect_before_wrap();
|
let rect = ui.available_rect_before_wrap();
|
||||||
egui::Grid::new("id_source")
|
egui::Grid::new("grid_of_bits")
|
||||||
.min_col_width(rect.width() / 2.0)
|
.min_col_width(rect.width() / 2.0)
|
||||||
.show(ui, |ui| {
|
.show(ui, |ui| {
|
||||||
ui.vertical(|ui| {
|
ui.vertical(|ui| {
|
||||||
|
|||||||
36
rog-control-center/src/startup_error.rs
Normal file
36
rog-control-center/src/startup_error.rs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
use egui::{Button, RichText};
|
||||||
|
|
||||||
|
pub struct AppErrorShow {
|
||||||
|
error: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AppErrorShow {
|
||||||
|
pub fn new(error: String) -> Self {
|
||||||
|
Self { error }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl eframe::App for AppErrorShow {
|
||||||
|
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
|
||||||
|
egui::CentralPanel::default().show(ctx, |ui| {
|
||||||
|
ui.heading("ROG ERROR");
|
||||||
|
|
||||||
|
ui.centered_and_justified(|ui| {
|
||||||
|
ui.label(RichText::new(format!("The error was: {:?}", self.error)).size(22.0));
|
||||||
|
});
|
||||||
|
|
||||||
|
egui::TopBottomPanel::bottom("error_bar_2")
|
||||||
|
.default_height(26.0)
|
||||||
|
.show(ctx, |ui| {
|
||||||
|
ui.with_layout(egui::Layout::right_to_left(egui::Align::TOP), |ui| {
|
||||||
|
if ui
|
||||||
|
.add(Button::new(RichText::new("Okay").size(20.0)))
|
||||||
|
.clicked()
|
||||||
|
{
|
||||||
|
frame.quit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -55,7 +55,7 @@ pub fn fan_graphs(
|
|||||||
let line = Line::new(PlotPoints::from_iter(points.clone())).width(2.0);
|
let line = Line::new(PlotPoints::from_iter(points.clone())).width(2.0);
|
||||||
let points = Points::new(PlotPoints::from_iter(points)).radius(3.0);
|
let points = Points::new(PlotPoints::from_iter(points)).radius(3.0);
|
||||||
|
|
||||||
Plot::new("my_plot")
|
Plot::new("fan_curves")
|
||||||
.view_aspect(1.666)
|
.view_aspect(1.666)
|
||||||
// .center_x_axis(true)
|
// .center_x_axis(true)
|
||||||
// .center_y_axis(true)
|
// .center_y_axis(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user