aboutsummaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-24 02:57:03 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-24 02:59:39 +0300
commit80a314a9089b28c1bfdc2cdf5196e9a2eb9f11ba (patch)
treefca593cafa027f4283adcec80c2f8908ef79708e /src/config
parenta132a7c3b9ade3ad4636e03b1f0930b5fa711766 (diff)
feat: add session navigator
refs #157
Diffstat (limited to 'src/config')
-rw-r--r--src/config/keybinds.rs14
-rw-r--r--src/config/model.rs3
2 files changed, 17 insertions, 0 deletions
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!(
@@ -1099,6 +1101,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();
assert!(kb.open_worktree.bindings.is_empty());
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"),