diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-14 02:50:00 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-14 02:50:00 +0300 |
| commit | ed4253d6031c9a3b12ddd6dfc7d7bf39480ae761 (patch) | |
| tree | 315cea3ee7b5ad3a7c3f9fb31272064a0eed5dd2 /src/config/model.rs | |
| parent | 287bf51640f8e1bed227cb27d93377d962851196 (diff) | |
feat: add tmux-style mouse capture config
Diffstat (limited to 'src/config/model.rs')
| -rw-r--r-- | src/config/model.rs | 16 |
1 files changed, 16 insertions, 0 deletions
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, @@ -273,6 +276,19 @@ show_agent_labels_on_pane_borders = true } #[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#" [ui.toast] |
