Skip to content

Commit

Permalink
Merge pull request #149 from ArchWand/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Toqozz authored Jun 16, 2024
2 parents 9fb2153 + 432acd2 commit 9e4bbd5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ pub fn handle_socket_message(
.ok_or(CLIError::Parse("Malformed action request."))?;

let id = get_window_id(notif_id, manager)?;
let action = action_id
.parse::<usize>()
.map_err(|_| CLIError::Parse("Value is not of type usize."))?;
let action = match action_id {
"default" => 0,
_ => { action_id
.parse::<usize>()
.map_err(|_| CLIError::Parse("Value is not of type usize."))?
}
};
manager.trigger_action_idx(id, action);
}
"show" => {
Expand Down

0 comments on commit 9e4bbd5

Please sign in to comment.