Use system_actions for suspend

This commit is contained in:
Ian Douglas Scott 2024-10-27 21:21:10 -07:00 committed by Ian Douglas Scott
parent 983d34ad96
commit 6d3dbedd50
2 changed files with 10 additions and 7 deletions

View file

@ -179,8 +179,11 @@ impl State {
fn update_suspend_idle(&mut self, is_idle: bool) {
if is_idle {
// TODO: Make command configurable
run_command("systemctl suspend".to_string());
let command = self
.system_actions
.get(&shortcuts::action::System::Suspend)
.map_or("systemctl suspend", |s| s.as_str());
crate::run_command(command.to_string());
}
}