32

I've reset my computer and now tmux is complaining about my .tmux.conf having these directives:

setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window off
set -g default-terminal "screen-256color"

with these errors:

/Users/mdurrant/.tmux.conf:24: unknown option: mode-mouse                  [0/0]
/Users/mdurrant/.tmux.conf:25: unknown option: mouse-select-pane
/Users/mdurrant/.tmux.conf:26: unknown option: mouse-resize-pane
/Users/mdurrant/.tmux.conf:27: unknown option: mouse-select-window

So I have to comment them out, but then my mouse doesn't work in tmux, which is a pain.

How can I enable the mouse in iTerm2 with tmux?

This works on my other Mac.

I use tmux version 2.1.

2 Answers 2

62

This looks like a change in tmux in 2.0 -> 2.1

I've replaced

setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window off

with just

set-option -g mouse on

and everything seems ok

2
  • 5
    mouse on configures the following: The default key bindings allow the mouse to be used to select and resize panes, to copy text and to change window using the status line., so it's the equivalent of setting mouse-select-pane, mouse-resize-pane and mouse-select-window as on. Probably close enough to the original configuration; though not exactly the same.
    – davidjb
    Commented Aug 6, 2016 at 7:05
  • All these years I was driving with the handbrake on.
    – PnotNP
    Commented Jul 28, 2019 at 18:38
2

mode-mouse isn't support on tmux. Try use on ~/.tmux.conf

set -g mouse on

and run on terminal

tmux source-file ~/.tmux.conf

Work so good on my computer, it can scroll, change panes...

1
  • it was obsolete and simplified Commented Dec 22, 2023 at 10:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .