aboutsummaryrefslogtreecommitdiff
path: root/src/config/model.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/model.rs')
-rw-r--r--src/config/model.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/config/model.rs b/src/config/model.rs
index ba700731..9bd83a96 100644
--- a/src/config/model.rs
+++ b/src/config/model.rs
@@ -438,6 +438,14 @@ pub struct KeysConfig {
pub zoom: BindingConfig,
/// Enter resize mode. Default: "prefix+r"
pub resize_mode: BindingConfig,
+ /// Resize the focused pane toward the left. Unset by default.
+ pub resize_pane_left: BindingConfig,
+ /// Resize the focused pane downward. Unset by default.
+ pub resize_pane_down: BindingConfig,
+ /// Resize the focused pane upward. Unset by default.
+ pub resize_pane_up: BindingConfig,
+ /// Resize the focused pane toward the right. Unset by default.
+ pub resize_pane_right: BindingConfig,
/// Toggle sidebar collapse. Default: "prefix+b"
pub toggle_sidebar: BindingConfig,
/// Optional indexed shortcuts expanded over number keys 1-9.
@@ -557,6 +565,14 @@ pub(crate) struct KeysConfigOverlay {
#[serde(skip_serializing_if = "Option::is_none")]
resize_mode: Option<BindingConfig>,
#[serde(skip_serializing_if = "Option::is_none")]
+ resize_pane_left: Option<BindingConfig>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ resize_pane_down: Option<BindingConfig>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ resize_pane_up: Option<BindingConfig>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ resize_pane_right: Option<BindingConfig>,
+ #[serde(skip_serializing_if = "Option::is_none")]
toggle_sidebar: Option<BindingConfig>,
#[serde(skip_serializing_if = "Option::is_none")]
indexed: Option<IndexedKeysConfig>,
@@ -633,6 +649,10 @@ impl<'de> Deserialize<'de> for KeysConfig {
apply_field!(close_pane);
apply_field!(zoom);
apply_field!(resize_mode);
+ apply_field!(resize_pane_left);
+ apply_field!(resize_pane_down);
+ apply_field!(resize_pane_up);
+ apply_field!(resize_pane_right);
apply_field!(toggle_sidebar);
apply_field!(indexed);
apply_field!(command);
@@ -731,6 +751,10 @@ impl KeysConfig {
copy_effective_action_field!(close_pane, keybinds.close_pane);
copy_effective_action_field!(zoom, keybinds.zoom);
copy_effective_action_field!(resize_mode, keybinds.resize_mode);
+ copy_effective_action_field!(resize_pane_left, keybinds.resize_pane_left);
+ copy_effective_action_field!(resize_pane_down, keybinds.resize_pane_down);
+ copy_effective_action_field!(resize_pane_up, keybinds.resize_pane_up);
+ copy_effective_action_field!(resize_pane_right, keybinds.resize_pane_right);
copy_effective_action_field!(toggle_sidebar, keybinds.toggle_sidebar);
copy_user_field!(indexed);
@@ -1019,6 +1043,10 @@ impl Default for KeysConfig {
close_pane: BindingConfig::one("prefix+x"),
zoom: BindingConfig::one("prefix+z"),
resize_mode: BindingConfig::one("prefix+r"),
+ resize_pane_left: BindingConfig::empty(),
+ resize_pane_down: BindingConfig::empty(),
+ resize_pane_up: BindingConfig::empty(),
+ resize_pane_right: BindingConfig::empty(),
toggle_sidebar: BindingConfig::one("prefix+b"),
indexed: IndexedKeysConfig::default(),
command: Vec::new(),