Skip to content

Conversation

jimsynz
Copy link

@jimsynz jimsynz commented Aug 10, 2025

Summary

  • Add new focus_follows_mouse configuration option that automatically focuses panes when the mouse hovers over them
  • Integrates seamlessly with existing mouse hover detection system
  • Requires advanced_mouse_actions to be enabled

Configuration

Works via both config file and CLI:

Config file:

options {
    advanced_mouse_actions true
    focus_follows_mouse true
}

CLI:

zellij options --focus-follows-mouse true

Implementation Details

  • Defaults to false for backwards compatibility
  • Leverages existing hover detection in tab/mod.rs
  • Uses existing focus_pane_with_id() method for consistency
  • Extends MouseEffect struct with focus_changed field
  • Minimal implementation (~100 lines of code)

Test plan

  • All existing tests pass
  • New configuration option appears in generated config files
  • CLI flag works correctly with options subcommand
  • Feature integrates properly with existing mouse system
  • Backwards compatible (defaults to disabled)

Add new configuration option to automatically focus panes when mouse hovers over them. Requires advanced_mouse_actions to be enabled. Defaults to false for backwards compatibility.

- Add focus_follows_mouse option to Options struct
- Integrate with existing mouse hover detection system
- Support both config file and CLI configuration
- Update all tests and snapshots for new option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant