From ed4253d6031c9a3b12ddd6dfc7d7bf39480ae761 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Thu, 14 May 2026 02:50:00 +0300 Subject: feat: add tmux-style mouse capture config --- src/config/model.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/config/model.rs') diff --git a/src/config/model.rs b/src/config/model.rs index ffc117ed..a576418b 100644 --- a/src/config/model.rs +++ b/src/config/model.rs @@ -129,6 +129,8 @@ pub struct KeysConfig { #[serde(default)] pub struct UiConfig { pub sidebar_width: u16, + /// Capture mouse input for Herdr's mouse UI. Default: true. + pub mouse_capture: bool, /// Ask for confirmation before closing a workspace. Default: true. pub confirm_close: bool, /// Show agent labels in split pane borders when no manual pane label is set. Default: false. @@ -195,6 +197,7 @@ impl Default for UiConfig { fn default() -> Self { Self { sidebar_width: 26, + mouse_capture: true, confirm_close: true, show_agent_labels_on_pane_borders: false, agent_panel_scope: AgentPanelScopeConfig::All, @@ -272,6 +275,19 @@ show_agent_labels_on_pane_borders = true assert!(config.ui.show_agent_labels_on_pane_borders); } + #[test] + fn mouse_capture_default_on_and_parse() { + let default_config = Config::default(); + assert!(default_config.ui.mouse_capture); + + let toml = r#" +[ui] +mouse_capture = false +"#; + let config: Config = toml::from_str(toml).unwrap(); + assert!(!config.ui.mouse_capture); + } + #[test] fn toast_config_parses() { let toml = r#" -- cgit v1.2.3