fix: use loginctl lock-session as fallback in case system_actions was not readable
This commit is contained in:
parent
7899fccbbe
commit
267bb837f1
1 changed files with 3 additions and 4 deletions
|
|
@ -171,12 +171,11 @@ impl State {
|
|||
}
|
||||
|
||||
fn lock_screen(&self) {
|
||||
if let Some(command) = self
|
||||
let command = self
|
||||
.system_actions
|
||||
.get(&shortcuts::action::System::LockScreen)
|
||||
{
|
||||
crate::run_command(command.to_string());
|
||||
}
|
||||
.map_or("loginctl lock-session", |s| s.as_str());
|
||||
crate::run_command(command.to_string());
|
||||
}
|
||||
|
||||
fn update_suspend_idle(&mut self, is_idle: bool) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue