Prep for new release

This commit is contained in:
Luke D. Jones
2022-08-17 10:32:24 +12:00
parent 24fa075a44
commit fb92d65fa0
18 changed files with 64 additions and 56 deletions

View File

@@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased ] ## [Unreleased ]
### Changed ### Changed (v4.4.0)
- Create new rog-platform crate to manage all i/o in a universal way - Create new rog-platform crate to manage all i/o in a universal way
+ kbd-led handling (requires kernel patches, TUF specific) + kbd-led handling (requires kernel patches, TUF specific)
+ platform handling (asus-nb-wmi) + platform handling (asus-nb-wmi)

10
Cargo.lock generated
View File

@@ -542,7 +542,7 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35"
[[package]] [[package]]
name = "daemon" name = "daemon"
version = "4.3.4" version = "4.4.0-rc1"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"env_logger", "env_logger",
@@ -1952,13 +1952,15 @@ dependencies = [
[[package]] [[package]]
name = "rog-control-center" name = "rog-control-center"
version = "1.0.1" version = "1.1.0-rc1"
dependencies = [ dependencies = [
"daemon",
"dirs 3.0.2", "dirs 3.0.2",
"eframe", "eframe",
"egui", "egui",
"nix 0.20.2", "nix 0.20.2",
"notify-rust", "notify-rust",
"rog_anime",
"rog_aura", "rog_aura",
"rog_dbus", "rog_dbus",
"rog_platform", "rog_platform",
@@ -1990,7 +1992,7 @@ dependencies = [
[[package]] [[package]]
name = "rog_aura" name = "rog_aura"
version = "1.2.2" version = "1.3.0"
dependencies = [ dependencies = [
"serde", "serde",
"serde_derive", "serde_derive",
@@ -2000,7 +2002,7 @@ dependencies = [
[[package]] [[package]]
name = "rog_dbus" name = "rog_dbus"
version = "4.2.1" version = "4.4.0"
dependencies = [ dependencies = [
"rog_anime", "rog_anime",
"rog_aura", "rog_aura",

View File

@@ -2,6 +2,8 @@
[![](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=4V2DEPS7K6APC) - [Asus Linux Website](https://asus-linux.org/) [![](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=4V2DEPS7K6APC) - [Asus Linux Website](https://asus-linux.org/)
**WARNING:** Do not run the main branch of this repo unless you have all the asus-wmi kernel patches. You should use stable kernels + tagged releases.
`asusd` is a utility for Linux to control many aspects of various ASUS laptops `asusd` is a utility for Linux to control many aspects of various ASUS laptops
but can also be used with non-asus laptops with reduced features. but can also be used with non-asus laptops with reduced features.

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "daemon" name = "daemon"
version = "4.3.4" version = "4.4.0-rc1"
license = "MPL-2.0" license = "MPL-2.0"
readme = "README.md" readme = "README.md"
authors = ["Luke <luke@ljones.dev>"] authors = ["Luke <luke@ljones.dev>"]

View File

@@ -39,7 +39,7 @@ use smol::{stream::StreamExt, Executor, Timer};
use zbus::Connection; use zbus::Connection;
use zvariant::ObjectPath; use zvariant::ObjectPath;
pub static VERSION: &str = env!("CARGO_PKG_VERSION"); pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub trait Reloadable { pub trait Reloadable {
fn reload(&mut self) -> Result<(), RogError>; fn reload(&mut self) -> Result<(), RogError>;

View File

@@ -32,4 +32,4 @@ pub mod error;
/// Provides const methods to create the USB HID control packets /// Provides const methods to create the USB HID control packets
pub mod usb; pub mod usb;
pub static VERSION: &str = env!("CARGO_PKG_VERSION"); pub const VERSION: &str = env!("CARGO_PKG_VERSION");

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "rog_aura" name = "rog_aura"
version = "1.2.2" version = "1.3.0"
license = "MPL-2.0" license = "MPL-2.0"
readme = "README.md" readme = "README.md"
authors = ["Luke <luke@ljones.dev>"] authors = ["Luke <luke@ljones.dev>"]

View File

@@ -16,7 +16,7 @@ pub mod layouts;
pub mod usb; pub mod usb;
pub const LED_MSG_LEN: usize = 17; pub const LED_MSG_LEN: usize = 17;
pub static VERSION: &str = env!("CARGO_PKG_VERSION"); pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const RED: Colour = Colour(0xff, 0x00, 0x00); pub const RED: Colour = Colour(0xff, 0x00, 0x00);
pub const GREEN: Colour = Colour(0x00, 0xff, 0x00); pub const GREEN: Colour = Colour(0x00, 0xff, 0x00);

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "rog-control-center" name = "rog-control-center"
version = "1.0.1" version = "1.1.0-rc1"
authors = ["Luke D. Jones <luke@ljones.dev>"] authors = ["Luke D. Jones <luke@ljones.dev>"]
edition = "2021" edition = "2021"
@@ -12,6 +12,8 @@ egui = { git = "https://github.com/emilk/egui" }
eframe= { git = "https://github.com/emilk/egui" } eframe= { git = "https://github.com/emilk/egui" }
#eframe= { git = "https://github.com/emilk/egui", default-features = false, features = ["dark-light", "default_fonts", "wgpu"] } #eframe= { git = "https://github.com/emilk/egui", default-features = false, features = ["dark-light", "default_fonts", "wgpu"] }
daemon = { path = "../daemon" }
rog_anime = { path = "../rog-anime" }
rog_dbus = { path = "../rog-dbus" } rog_dbus = { path = "../rog-dbus" }
rog_aura = { path = "../rog-aura" } rog_aura = { path = "../rog-aura" }
rog_profiles = { path = "../rog-profiles" } rog_profiles = { path = "../rog-profiles" }

View File

@@ -28,6 +28,20 @@ use nix::{sys::stat, unistd};
use tempfile::TempDir; use tempfile::TempDir;
//use log::{error, info, warn}; //use log::{error, info, warn};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub fn print_versions() {
println!("App and daemon versions:");
println!(" rog-gui v{}", VERSION);
println!(" asusd v{}", daemon::VERSION);
println!("\nComponent crate versions:");
println!(" rog-anime v{}", rog_anime::VERSION);
println!(" rog-aura v{}", rog_aura::VERSION);
println!(" rog-dbus v{}", rog_dbus::VERSION);
println!(" rog-profiles v{}", rog_profiles::VERSION);
println!("rog-platform v{}", rog_platform::VERSION);
}
pub const SHOWING_GUI: u8 = 1; pub const SHOWING_GUI: u8 = 1;
pub const SHOW_GUI: u8 = 2; pub const SHOW_GUI: u8 = 2;

View File

@@ -1,8 +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, startup_error::AppErrorShow, RogApp, RogDbusClientBlocking, page_states::PageDataStates, print_versions, startup_error::AppErrorShow, RogApp,
SHOWING_GUI, SHOW_GUI, RogDbusClientBlocking, SHOWING_GUI, SHOW_GUI,
}; };
use std::{ use std::{
@@ -19,6 +19,8 @@ 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>> {
print_versions();
let native_options = eframe::NativeOptions { let native_options = eframe::NativeOptions {
decorated: false, decorated: false,
transparent: false, transparent: false,

View File

@@ -1,11 +1,14 @@
use crate::{ use crate::{
widgets::{anime_power_group, aura_power_group, platform_profile, rog_bios_group}, widgets::{
anime_power_group, app_settings, aura_power_group, platform_profile, rog_bios_group,
},
RogApp, RogApp,
}; };
impl<'a> RogApp<'a> { impl<'a> RogApp<'a> {
pub fn system_page(&mut self, ctx: &egui::Context) { pub fn system_page(&mut self, ctx: &egui::Context) {
let Self { let Self {
config,
supported, supported,
states, states,
asus_dbus: dbus, asus_dbus: dbus,
@@ -21,30 +24,42 @@ impl<'a> RogApp<'a> {
egui::Grid::new("grid_of_bits") 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.separator();
app_settings(config, states, ui);
});
ui.vertical(|ui| { ui.vertical(|ui| {
ui.separator(); ui.separator();
if supported.platform_profile.platform_profile { if supported.platform_profile.platform_profile {
platform_profile(states, dbus, ui); platform_profile(states, dbus, ui);
} }
}); });
ui.end_row();
/******************************************************/
ui.vertical(|ui| { ui.vertical(|ui| {
ui.separator(); ui.separator();
aura_power_group(supported, states, dbus, ui); aura_power_group(supported, states, dbus, ui);
}); });
ui.end_row();
ui.vertical(|ui| { ui.vertical(|ui| {
ui.separator(); ui.separator();
rog_bios_group(supported, states, dbus, ui); rog_bios_group(supported, states, dbus, ui);
}); });
ui.end_row();
/******************************************************/
ui.vertical(|ui| { ui.vertical(|ui| {
ui.separator(); ui.separator();
if supported.anime_ctrl.0 { if supported.anime_ctrl.0 {
anime_power_group(supported, states, dbus, ui); anime_power_group(supported, states, dbus, ui);
} }
}); });
ui.vertical(|ui| {
ui.separator();
});
ui.end_row(); ui.end_row();
}); });
}); });

View File

@@ -1,4 +1,5 @@
mod anime_power; mod anime_power;
mod app_settings;
mod aura_modes; mod aura_modes;
mod aura_power; mod aura_power;
mod fan_graph; mod fan_graph;
@@ -8,6 +9,7 @@ mod side_panel;
mod top_bar; mod top_bar;
pub use anime_power::*; pub use anime_power::*;
pub use app_settings::*;
pub use aura_modes::*; pub use aura_modes::*;
pub use aura_power::*; pub use aura_power::*;
pub use fan_graph::*; pub use fan_graph::*;

View File

@@ -1,46 +1,14 @@
use std::sync::atomic::Ordering;
use egui::{vec2, Align2, Button, FontId, Id, Rect, RichText, Sense, Vec2}; use egui::{vec2, Align2, Button, FontId, Id, Rect, RichText, Sense, Vec2};
use crate::RogApp; use crate::{RogApp, VERSION};
impl<'a> RogApp<'a> { impl<'a> RogApp<'a> {
pub fn top_bar(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { pub fn top_bar(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
let Self { states, config, .. } = self;
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| { egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
// The top panel is often a good place for a menu bar: // The top panel is often a good place for a menu bar:
egui::menu::bar(ui, |ui| { egui::menu::bar(ui, |ui| {
ui.menu_button("File", |ui| {
if ui.button("Quit").clicked() {
frame.quit();
}
});
ui.menu_button("Settings", |ui| {
if ui
.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()
{
states
.notifs_enabled
.store(config.enable_notifications, Ordering::SeqCst);
config
.save()
.map_err(|err| {
states.error = Some(err.to_string());
})
.ok();
}
});
ui.horizontal(|ui| { ui.horizontal(|ui| {
egui::global_dark_light_mode_switch(ui); egui::global_dark_light_mode_buttons(ui);
egui::warn_if_debug_build(ui); egui::warn_if_debug_build(ui);
}); });
@@ -61,7 +29,7 @@ impl<'a> RogApp<'a> {
ui.painter().text( ui.painter().text(
titlebar_rect.center_top() + vec2(0.0, height / 2.0), titlebar_rect.center_top() + vec2(0.0, height / 2.0),
Align2::CENTER_CENTER, Align2::CENTER_CENTER,
"ROG Control Center", format!("ROG Control Center v{}", VERSION),
FontId::proportional(height - 2.0), FontId::proportional(height - 2.0),
text_color, text_color,
); );

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "rog_dbus" name = "rog_dbus"
version = "4.2.1" version = "4.4.0"
license = "MPL-2.0" license = "MPL-2.0"
readme = "README.md" readme = "README.md"
authors = ["Luke <luke@ljones.dev>"] authors = ["Luke <luke@ljones.dev>"]

View File

@@ -15,7 +15,8 @@ pub mod zbus_supported;
// use std::sync::mpsc::{channel, Receiver}; // use std::sync::mpsc::{channel, Receiver};
use zbus::{blocking, Connection, Result}; use zbus::{blocking, Connection, Result};
pub static VERSION: &str = env!("CARGO_PKG_VERSION"); pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub struct DbusProxiesBlocking<'a> { pub struct DbusProxiesBlocking<'a> {
anime: zbus_anime::AnimeProxyBlocking<'a>, anime: zbus_anime::AnimeProxyBlocking<'a>,
charge: zbus_charge::ChargeProxyBlocking<'a>, charge: zbus_charge::ChargeProxyBlocking<'a>,

View File

@@ -13,7 +13,7 @@ use std::path::Path;
use error::{PlatformError, Result}; use error::{PlatformError, Result};
use udev::Device; use udev::Device;
pub static VERSION: &str = env!("CARGO_PKG_VERSION"); pub const VERSION: &str = env!("CARGO_PKG_VERSION");
#[macro_export] #[macro_export]
macro_rules! attr_bool { macro_rules! attr_bool {

View File

@@ -15,10 +15,10 @@ use udev::Device;
#[cfg(feature = "dbus")] #[cfg(feature = "dbus")]
use zvariant_derive::Type; use zvariant_derive::Type;
pub static PLATFORM_PROFILE: &str = "/sys/firmware/acpi/platform_profile"; pub const PLATFORM_PROFILE: &str = "/sys/firmware/acpi/platform_profile";
pub static PLATFORM_PROFILES: &str = "/sys/firmware/acpi/platform_profile_choices"; pub const PLATFORM_PROFILES: &str = "/sys/firmware/acpi/platform_profile_choices";
pub static VERSION: &str = env!("CARGO_PKG_VERSION"); pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub fn find_fan_curve_node() -> Result<Option<Device>, ProfileError> { pub fn find_fan_curve_node() -> Result<Option<Device>, ProfileError> {
let mut enumerator = udev::Enumerator::new()?; let mut enumerator = udev::Enumerator::new()?;