How to Enable Scrolling in Tmux Panels with Mouse Wheel

How to enable scrolling in tmux panels with mouse wheel?

Origin Answer (deprecated)

Try this:

setw -g mode-mouse on

It can be used with the mouse-select-pane on and mouse-select-window on options.

Update

After tmux 2.1, mode-mouse option is no longer available. You should now use:

set -g mouse on

to capture mouse event.

mouse wheel isn't scrolling in tmux

Correct command is:

set -g mode-mouse on

You can also add it to your ~/.tmux.conf

How do I scroll in tmux using the mouse?

I figured out the problem. If you use the default Terminal.app, the mouse events are not being passed to the applications running inside the terminal. To fix this problem, you need to install MouseTerm, which requires SIMBL to be installed. You can find all of the instructions here:

https://bitheap.org/mouseterm/

Note that if you're using Mac OS X 10.9, when you try to run the install script for MouseTerm it will say that the file is corrupted. To solve this problem, just manually copy the bundle file to the SIMBL plugins folder and restart Terminal.app for it to work. You can find the SIMBL plugins folder at this path:

/Library/Application Support/SIMBL/Plugins

Mouse scrolling and selection in terminal with tmux

I suspect your issue is actually that lines aren't being placed in the scrollback buffer at all, rather than tmux taking over the mouse and keys.

Tmux by default uses the "alternate screen buffer" (you may notice that if you have text on the screen, then attach and detach tmux, the text will come back). Many terminal emulators will not place text that is scrolled or erased in this mode in the scrollback buffer. To disable this, do this:

set -g terminal-overrides 'xterm*:smcup@:rmcup@'

Where xterm* is whatever your terminal reports itself as in the $TERM environment variable. You may need to detach, reset the terminal, and reattach, to have it work if you set the option interactively.

NOTE: If you use termcap instead of terminfo, use ti and te instead of smcup/rmcup.

How to mouse-wheel scroll downwards with tmux

I just upgraded from tmux 1.6 to the new tmux 1.8 (compiled from source rather than Homebrew, in case that matters), and it's working again now.

tmux set -g mouse-mode on not scrolling

So this option has been renamed in version 2.1 (18 October 2015)

From the changelog:

 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

So this is what I'm using now in my .tmux.conf file

set -g mouse on


Related Topics



Leave a reply



Submit