Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/cardwire-daemon/src/file/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,7 @@ impl CardwireConfig {
pub fn battery_auto_switch(&self) -> bool {
self.battery_auto_switch
}
pub fn battery_auto_switch_mode(&self) -> Modes {
self.battery_auto_switch_mode
}
}
4 changes: 3 additions & 1 deletion crates/cardwire-daemon/src/interface/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ impl ConfigMemory {
let experimental_nvidia_block =
Arc::new(AtomicBool::new(user_config.experimental_nvidia_block()));
let battery_auto_switch = Arc::new(AtomicBool::new(user_config.battery_auto_switch()));
let battery_auto_switch_mode =
Arc::new(RwLock::new(user_config.battery_auto_switch_mode()));

ConfigMemory {
auto_apply_gpu_state,
experimental_nvidia_block,
battery_auto_switch,
battery_auto_switch_mode: Arc::new(RwLock::new(Modes::Smart)),
battery_auto_switch_mode,
}
}
}
Expand Down