aboutsummaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/config')
-rw-r--r--src/config/keybinds.rs8
-rw-r--r--src/config/model.rs3
2 files changed, 11 insertions, 0 deletions
diff --git a/src/config/keybinds.rs b/src/config/keybinds.rs
index 9235cf05..ea7f411c 100644
--- a/src/config/keybinds.rs
+++ b/src/config/keybinds.rs
@@ -288,6 +288,7 @@ pub struct Keybinds {
pub focus_pane_right: ActionKeybinds,
pub cycle_pane_next: ActionKeybinds,
pub cycle_pane_previous: ActionKeybinds,
+ pub last_pane: ActionKeybinds,
pub split_vertical: ActionKeybinds,
pub split_horizontal: ActionKeybinds,
pub close_pane: ActionKeybinds,
@@ -463,6 +464,7 @@ impl Config {
focus_pane_down: action!("keys.focus_pane_down", &self.keys.focus_pane_down),
focus_pane_up: action!("keys.focus_pane_up", &self.keys.focus_pane_up),
focus_pane_right: action!("keys.focus_pane_right", &self.keys.focus_pane_right),
+ last_pane: action!("keys.last_pane", &self.keys.last_pane),
cycle_pane_next: action!("keys.cycle_pane_next", &self.keys.cycle_pane_next),
cycle_pane_previous: action!(
"keys.cycle_pane_previous",
@@ -1265,6 +1267,12 @@ next_tab = "prefix+n"
}
#[test]
+ fn back_and_forth_keybinds_are_unset_by_default() {
+ let kb = Config::default().keybinds();
+ assert!(kb.last_pane.bindings.is_empty());
+ }
+
+ #[test]
fn array_bindings_allow_prefix_and_modified_direct() {
let config: Config = toml::from_str(
r#"
diff --git a/src/config/model.rs b/src/config/model.rs
index 7434c924..d4830df1 100644
--- a/src/config/model.rs
+++ b/src/config/model.rs
@@ -211,6 +211,8 @@ pub struct KeysConfig {
pub cycle_pane_next: BindingConfig,
/// Cycle to the previous pane. Default: "prefix+shift+tab".
pub cycle_pane_previous: BindingConfig,
+ /// Focus the last focused pane across workspaces and tabs. Unset by default.
+ pub last_pane: BindingConfig,
/// Split pane vertically (side by side). Default: "prefix+v"
pub split_vertical: BindingConfig,
/// Split pane horizontally (stacked). Default: "prefix+minus"
@@ -391,6 +393,7 @@ impl Default for KeysConfig {
focus_pane_right: BindingConfig::one("prefix+l"),
cycle_pane_next: BindingConfig::one("prefix+tab"),
cycle_pane_previous: BindingConfig::one("prefix+shift+tab"),
+ last_pane: BindingConfig::empty(),
split_vertical: BindingConfig::one("prefix+v"),
split_horizontal: BindingConfig::one("prefix+minus"),
close_pane: BindingConfig::one("prefix+x"),