config: add focus-tiles action
This commit is contained in:
parent
bd85db5b59
commit
57a49d5299
11 changed files with 61 additions and 1 deletions
|
|
@ -76,6 +76,7 @@ pub enum SimpleCommand {
|
|||
ToggleBar,
|
||||
FocusHistory(Timeline),
|
||||
FocusLayerRel(LayerDirection),
|
||||
FocusTiles,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ impl ActionParser<'_> {
|
|||
"focus-next" => FocusHistory(Timeline::Newer),
|
||||
"focus-below" => FocusLayerRel(LayerDirection::Below),
|
||||
"focus-above" => FocusLayerRel(LayerDirection::Above),
|
||||
"focus-tiles" => FocusTiles,
|
||||
_ => {
|
||||
return Err(
|
||||
ActionParserError::UnknownSimpleAction(string.to_string()).spanned(span)
|
||||
|
|
|
|||
|
|
@ -164,6 +164,10 @@ impl Action {
|
|||
let persistent = state.persistent.clone();
|
||||
B::new(move || persistent.seat.focus_layer_rel(direction))
|
||||
}
|
||||
SimpleCommand::FocusTiles => {
|
||||
let persistent = state.persistent.clone();
|
||||
B::new(move || persistent.seat.focus_tiles())
|
||||
}
|
||||
},
|
||||
Action::Multi { actions } => {
|
||||
let actions: Vec<_> = actions.into_iter().map(|a| a.into_fn(state)).collect();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue