Is it possible to use the mouse to navigate between different window panes which are split vertically or horizontally?
Asked
Active
Viewed 6.5k times
3 Answers
111
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

mfarrugi
- 3

jasonwryan
- 73,126
6
For those who are newbie with tmux, here all the steps to do:
Step 1: Start tmux in your terminal.
tmux
Step 2: Enter tmux's command mode by pressing Ctrl+b
followed by :
.
Step 3: Type the following command and press Enter to enable mouse support:
setw -g mouse on
Step 4: You can now use the mouse to click on a window pane to switch to it or click and drag on pane borders to resize them.

Emidomenge
- 241
1
Please try:
set-option -g mouse on
bind-key -T root MouseDown1Pane select-pane -t =

Ahmad Ismail
- 2,678
prefix
Ctrl
+[
) when you have more than 1 pane. – Patryk Jan 07 '13 at 12:08less
pagination so.. nope... I'm on tmux 2.0, may try again with the new setup after upgrading to 2.1 – Louis Maddox Dec 04 '15 at 23:51.tmux.conf:76: invalid option: mouse-select-pane
– alper May 12 '20 at 11:04set mouse on
works – codepearlex Apr 14 '21 at 16:54iTerm
enable clipboard from preferences:Preferences > General > Selection > Applications in terminal may access clipboard
Now no need to press shift,cmnd+c
works as usual. – vaibhavatul47 Jan 30 '22 at 09:28