Tmux, change window pane by mouse click

tmux

Is it possible to use the mouse to navigate between different window panes which are split vertically or horizontally?

Best Answer

As of tmux 2.1, you can enable this by adding it to your .tmux.conf: set -g mouse on

  • Mouse-mode has been rewritten. There's now no longer options for:

    • mouse-resize-pane
    • mouse-select-pane
    • mouse-select-window
    • mode-mouse

    Instead there is just one option: 'mouse' which turns on mouse support entirely.


See the mouse-select-pane option in man tmux:

mouse-select-pane [on | off]
If on, tmux captures the mouse and when a window is split into multiple panes the mouse may be used to select the current pane. The mouse click is also passed through to the application as normal.

You can enable this by adding it to your .tmux.conf: set -g mouse-select-pane on

Related Question