42

I have put

set -g mouse on 
set -g mouse-select-pane on

in my .tmux.conf file and then I open tmux and create a new pane and I cant switch pane with mouse. is there something else I need to configure? I am using tmux 2.9 on Mac using zsh.

5
  • 1
    you may look at other parameters like Mouse-mode has been rewritten. There's now no longer options for: - mouse-resize-pane - mouse-select-pane - mouse-select-window - mode-mouse etc but it should have work with set -g mouse on only I guess
    – francois P
    Commented May 2, 2019 at 15:56
  • I have the same issue. I suspect it's a bug with mac.
    – jordanm
    Commented May 2, 2019 at 17:16
  • I have no insight into this issue. However, it might be beneficial to also add to your question what terminal program you are using; gnome-terminal, rxvt, etc. It's great that you indicated the tmux version, the hardware, and the shell. (With 'Mac', I assume you are running OS X/Mac OS...if not, that info is important too.) I don't know that it would matter, but I presume it could be helpful if this is an issue between the human-input-device all the way down to the tmux process.
    – 0xSheepdog
    Commented May 2, 2019 at 18:28
  • Are you using Terminal.app? I don't think it supports the mouse? Does it work with other applications, or in another terminal? Commented May 2, 2019 at 21:37
  • Check my answer in unix.stackexchange.com/questions/318281/…
    – GMaster
    Commented Sep 10, 2019 at 4:03

6 Answers 6

31

Here is a clarification of Mark Volkmann's answer. First make sure that you have set -g mouse on in your .tmux.conf file, and that you have sourced the file by running tmux source <whatever config file>. I have found the other line you have in your config to be unnecessary. Once you have the config file set up, run:

$ exit tmux
$ tmux kill-server
$ tmux

NOTE: In a previous version of this answer I listed Volkmann's answer as "horrible and unreadable". I do not find this to be correct nor do I find it an acceptable way to treat another person. Please accept my apology for being rude and inconsiderate.

0
11

I had the same issue. It was fixed after I did the following:

  • exit tmux
  • enter tmux kill-server
  • enter tmux again
9

On higher version 2.1 >, use :

setw -g mouse on
2
8

After making the tmux config change, run tmux source ~/.tmux.conf for an "on-the-fly" change

6
# Toggle mouse with ^M; then report it's new status
bind-key C-m set-option -g mouse \; display-message 'Mouse #{?mouse,on,off}'
3

To obtain the default behavior, which is equal as UP and DOWN keyboard arrows, use:

echo "set -g terminal-overrides 'xterm*:smcup@:rmcup@'" >> ~/.tmux.conf && tmux kill-server && tmux

You must log in to answer this question.

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