Fix one super silly bug

closes #30
This commit is contained in:
Luke D Jones
2020-10-22 08:14:21 +13:00
parent a23c51e5db
commit 6ce32c1cab
5 changed files with 27 additions and 27 deletions

4
Cargo.lock generated
View File

@@ -29,7 +29,7 @@ checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"
[[package]] [[package]]
name = "asus-nb" name = "asus-nb"
version = "2.0.4" version = "2.0.5"
dependencies = [ dependencies = [
"ctrl-gfx", "ctrl-gfx",
"dbus", "dbus",
@@ -191,7 +191,7 @@ dependencies = [
[[package]] [[package]]
name = "ctrl-gfx" name = "ctrl-gfx"
version = "2.1.1" version = "2.1.3"
dependencies = [ dependencies = [
"log", "log",
"sysfs-class", "sysfs-class",

View File

@@ -80,6 +80,7 @@ fn start_daemon() -> Result<(), Box<dyn Error>> {
} }
} }
if enable_gfx_switching {
match CtrlGraphics::new() { match CtrlGraphics::new() {
Ok(mut ctrl) => { Ok(mut ctrl) => {
ctrl.reload() ctrl.reload()
@@ -90,11 +91,11 @@ fn start_daemon() -> Result<(), Box<dyn Error>> {
error!("Gfx control: {}", err); error!("Gfx control: {}", err);
} }
} }
}
// Collect tasks for task thread // Collect tasks for task thread
let mut tasks: Vec<Arc<Mutex<dyn CtrlTask + Send>>> = Vec::new(); let mut tasks: Vec<Arc<Mutex<dyn CtrlTask + Send>>> = Vec::new();
if enable_gfx_switching {
match CtrlFanAndCPU::new(config.clone()) { match CtrlFanAndCPU::new(config.clone()) {
Ok(mut ctrl) => { Ok(mut ctrl) => {
ctrl.reload() ctrl.reload()
@@ -107,7 +108,6 @@ fn start_daemon() -> Result<(), Box<dyn Error>> {
error!("Profile control: {}", err); error!("Profile control: {}", err);
} }
}; };
}
if let Some(laptop) = laptop { if let Some(laptop) = laptop {
let ctrl = CtrlKbdBacklight::new( let ctrl = CtrlKbdBacklight::new(

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "asus-nb" name = "asus-nb"
version = "2.0.4" version = "2.0.5"
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

@@ -1,6 +1,6 @@
[package] [package]
name = "ctrl-gfx" name = "ctrl-gfx"
version = "2.1.1" version = "2.1.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>"]

View File

@@ -4,9 +4,9 @@ StartLimitInterval=200
StartLimitBurst=2 StartLimitBurst=2
[Service] [Service]
ExecStartPre=/usr/bin/sleep 2
ExecStart=/usr/bin/asus-notify ExecStart=/usr/bin/asus-notify
Restart=on-failure Restart=on-failure
Restart=always
RestartSec=1 RestartSec=1
Type=simple Type=simple