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
Pass Command-Line Arguments to Grep as Search Patterns and Print Lines Which Match Them All
How to Write Multiple Line String Using Bash with Variables
Bash Shell Script - Check for a Flag and Grab Its Value
How to Run Vi on Docker Container
How to Change File Permissions in Ubuntu
Difference Between Vm.Dirty_Ratio and Vm.Dirty_Background_Ratio
Setting Node_Env for Node.Js + Expressjs Application as a Daemon Under Ubuntu
How to List Specific Type of Files in Recursive Directories in Shell
Tool to Visualize the Device Tree File (Dtb) Used by the Linux Kernel
How to Conveniently Sync a File Between Two Git Repositories
Adding a Header into Multiple .Txt Files
Force Unmount of Nfs-Mounted Directory
Symbolic Link to a Hook in Git
How to Perform a 'Git Pull' Without Re-Entering My Ssh Password
Keep Remote Directory Up-To-Date
How to Make Stdout and Stderr Output Be of Different Colors in Xterm or Konsole