Skip to content

Commit

Permalink
Update deps and version
Browse files Browse the repository at this point in the history
4JX committed Jan 2, 2025
1 parent 74bc175 commit 49c3609
Showing 6 changed files with 790 additions and 826 deletions.
1,534 changes: 747 additions & 787 deletions Cargo.lock

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "legion-kb-rgb"
version = "0.19.6"
version = "0.20.0"
authors = ["4JX"]
edition = "2021"
homepage = "https://github.com/4JX/L5P-Keyboard-RGB"
@@ -13,26 +13,26 @@ license = "GPL-3.0"
legion-rgb-driver = { path = "../driver" }

# Cli
clap = { version = "4.5.17", features = ["color", "cargo", "derive"] }
clap = { version = "4.5.23", features = ["color", "cargo", "derive"] }

# Ui
eframe = "0.28.1"
eframe = { version = "0.30.0", features = ["x11", "wayland"] }
# tokio = { version = "1.41.1" }
egui-modal = "0.4.0"
egui-modal = "0.6.0"
# egui-modal = { git = "https://github.com/n00kii/egui-modal", rev = "8443238" }
egui_file = "0.18.0"
egui-notify = "0.15.0"
egui_file = "0.20.0"
egui-notify = "0.18.0"
# egui-notify = { git = "https://github.com/ItsEthra/egui-notify", rev = "bc5eb67" }

# App window, taskbar and tray icon loading
image = "0.25.2"
image = "0.25.5"

# AmbientLight effect
scrap = { git = "https://github.com/rustdesk/rustdesk", rev = "40af9dc", features = [
"wayland",
# "linux-pkg-config",
] }
fast_image_resize = "4.2.1"
fast_image_resize = "5.1.0"
# default-features = false just removes the use_wasm feature that removes a lot of unecessary slack
# since this app wont ever use the web
# photon-rs = { version = "0.3.2", default-features = false }
@@ -45,14 +45,14 @@ device_query = "2.1.0"
rand = "0.8.5"
strum = "0.26.3"
strum_macros = "0.26.4"
serde = { version = "1.0.210", features = ["derive"] }
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.128"
color-eyre = "0.6.3"
sysinfo = "0.31.4"
crossbeam-channel = "0.5.13"
sysinfo = "0.33.1"
crossbeam-channel = "0.5.14"
thiserror = "1.0.63"
single-instance = "0.3.3"
open = "5.3.0"
open = "5.3.1"
error-stack = "0.5.0"
winapi = { version = "0.3.9", features = ["consoleapi", "wincon"] }

8 changes: 4 additions & 4 deletions app/src/gui/menu_bar.rs
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ impl MenuBarState {
*changed = true;
}
Err(_) => {
toasts.error("Could not load profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true);
toasts.error("Could not load profile.").duration(Some(Duration::from_millis(5000))).closable(true);
}
}
self.update_paths(path);
@@ -61,7 +61,7 @@ impl MenuBarState {
if self.save_profile_dialog.show(ctx).selected() {
if let Some(path) = self.save_profile_dialog.path().map(|p| p.to_path_buf()) {
if current_profile.save_profile(&path).is_err() {
toasts.error("Could not save profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true);
toasts.error("Could not save profile.").duration(Some(Duration::from_millis(5000))).closable(true);
}
self.update_paths(path);
}
@@ -77,7 +77,7 @@ impl MenuBarState {
*changed = true;
}
Err(_) => {
toasts.error("Could not load custom effect.").set_duration(Some(Duration::from_millis(5000))).set_closable(true);
toasts.error("Could not load custom effect.").duration(Some(Duration::from_millis(5000))).closable(true);
}
}
self.update_paths(path);
@@ -143,7 +143,7 @@ impl MenuBarState {
ui.with_layout(Layout::right_to_left(Align::Center), |ui| {
if ui.button("📜").clicked() {
if !console::alloc_with_color_support() {
toasts.error("Could not allocate debug terminal.").set_duration(Some(Duration::from_millis(5000))).set_closable(true);
toasts.error("Could not allocate debug terminal.").duration(Some(Duration::from_millis(5000))).closable(true);
}
println!("Debug terminal enabled.");
}
3 changes: 2 additions & 1 deletion app/src/gui/mod.rs
Original file line number Diff line number Diff line change
@@ -223,7 +223,7 @@ impl eframe::App for App {
self.visible.store(true, Ordering::SeqCst);
self.toasts
.warning("Window hiding is currently not supported.\nSee https://github.com/4JX/L5P-Keyboard-RGB/issues/181")
.set_duration(None);
.duration(None);
}

if self.instance_not_unique && modals::unique_instance(ctx) {
@@ -283,6 +283,7 @@ impl App {
show_resize: false,
show_interactive_widgets: false,
show_widget_hits: false,
show_unaligned: false,
},
..Style::default()
};
23 changes: 13 additions & 10 deletions app/src/manager/effects/temperature.rs
Original file line number Diff line number Diff line change
@@ -24,17 +24,20 @@ pub fn play(manager: &mut Inner) {
if component.label().contains("Tctl") {
while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) {
component.refresh();
let mut adjusted_temp = component.temperature() - safe_temp;
if adjusted_temp < 0.0 {
adjusted_temp = 0.0;
let temp = component.temperature();
if let Some(temperature) = temp {
let mut adjusted_temp = temperature - safe_temp;
if adjusted_temp < 0.0 {
adjusted_temp = 0.0;
}
let temp_percent = (adjusted_temp / 100.0) * ramp_boost;

let mut target = [0.0; 12];
for index in 0..12 {
target[index] = color_differences[index].mul_add(temp_percent, temp_cool[index]);
}
manager.keyboard.transition_colors_to(&target.map(|val| val as u8), 5, 1).unwrap();
}
let temp_percent = (adjusted_temp / 100.0) * ramp_boost;

let mut target = [0.0; 12];
for index in 0..12 {
target[index] = color_differences[index].mul_add(temp_percent, temp_cool[index]);
}
manager.keyboard.transition_colors_to(&target.map(|val| val as u8), 5, 1).unwrap();
thread::sleep(Duration::from_millis(200));
}
}
24 changes: 12 additions & 12 deletions flake.lock

0 comments on commit 49c3609

Please sign in to comment.