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/main.rs | |
| parent | 287bf51640f8e1bed227cb27d93377d962851196 (diff) | |
feat: add tmux-style mouse capture config
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 7fcf624f..8a43746d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -120,6 +120,11 @@ const DEFAULT_CONFIG: &str = r##"# herdr configuration # Sidebar width (auto-scaled based on workspace names, this sets the default) # sidebar_width = 26 +# Capture mouse input for Herdr's mouse UI. +# Set false to let the terminal handle normal clicks, such as Cmd-clicking URLs. +# Pane apps like lazygit and btop can still receive mouse when they request it. +# mouse_capture = true + # Ask for confirmation before closing a workspace # confirm_close = true @@ -456,9 +461,13 @@ fn main() -> io::Result<()> { let result = rt.block_on(async { let mut terminal = ratatui::init(); + if config.ui.mouse_capture { + execute!(io::stdout(), EnableMouseCapture)?; + } else { + execute!(io::stdout(), DisableMouseCapture)?; + } execute!( io::stdout(), - EnableMouseCapture, EnableBracketedPaste, EnableFocusChange, PushKeyboardEnhancementFlags(crate::input::ime_compatible_keyboard_enhancement_flags()) |
