From 80a314a9089b28c1bfdc2cdf5196e9a2eb9f11ba Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 24 May 2026 02:57:03 +0300 Subject: feat: add session navigator refs #157 --- src/config/keybinds.rs | 14 ++++++++++++++ src/config/model.rs | 3 +++ 2 files changed, 17 insertions(+) (limited to 'src/config') diff --git a/src/config/keybinds.rs b/src/config/keybinds.rs index 014bab7a..e6109e30 100644 --- a/src/config/keybinds.rs +++ b/src/config/keybinds.rs @@ -252,6 +252,7 @@ pub struct Keybinds { pub rename_workspace: ActionKeybinds, pub close_workspace: ActionKeybinds, pub workspace_picker: ActionKeybinds, + pub goto: ActionKeybinds, pub detach: ActionKeybinds, pub reload_config: ActionKeybinds, pub open_notification_target: ActionKeybinds, @@ -384,6 +385,7 @@ impl Config { rename_workspace: action!("keys.rename_workspace", &self.keys.rename_workspace), close_workspace: action!("keys.close_workspace", &self.keys.close_workspace), workspace_picker: action!("keys.workspace_picker", &self.keys.workspace_picker), + goto: action!("keys.goto", &self.keys.goto), detach: action!("keys.detach", &self.keys.detach), reload_config: action!("keys.reload_config", &self.keys.reload_config), open_notification_target: action!( @@ -1098,6 +1100,18 @@ next_tab = "prefix+n" ); } + #[test] + fn goto_defaults_to_prefix_g() { + let kb = Config::default().keybinds(); + assert_eq!( + binding_triggers(&kb.goto), + vec![BindingTrigger::Prefix(( + KeyCode::Char('g'), + KeyModifiers::empty() + ))] + ); + } + #[test] fn open_and_remove_worktree_keybinds_are_unset_by_default() { let kb = Config::default().keybinds(); diff --git a/src/config/model.rs b/src/config/model.rs index 8894b300..b6b7a2fb 100644 --- a/src/config/model.rs +++ b/src/config/model.rs @@ -151,6 +151,8 @@ pub struct KeysConfig { pub close_workspace: BindingConfig, /// Open the workspace navigation surface. Default: "prefix+w" pub workspace_picker: BindingConfig, + /// Open the session navigator. Default: "prefix+g" + pub goto: BindingConfig, /// Detach from server/client mode, or exit --no-session mode. Default: "prefix+q". pub detach: BindingConfig, /// Reload config.toml in the running app/server. Default: "prefix+shift+r". @@ -343,6 +345,7 @@ impl Default for KeysConfig { rename_workspace: BindingConfig::one("prefix+shift+w"), close_workspace: BindingConfig::one("prefix+shift+d"), workspace_picker: BindingConfig::one("prefix+w"), + goto: BindingConfig::one("prefix+g"), detach: BindingConfig::one("prefix+q"), reload_config: BindingConfig::one("prefix+shift+r"), open_notification_target: BindingConfig::one("prefix+o"), -- cgit v1.2.3