You are not logged in.
I just got the tmux update to 2.1-1 yesterday, and today my mouse was not working with tmux (for scrolling or selecting/copy-mode).
I found the tmux changelog here which indicates the config has changed:
* Mouse-mode has been rewritten. There's now no longer options for:
- mouse-resize-pane
- mouse-select-pane
- mouse-select-window
- mode-mouseInstead there is just one option: 'mouse' which turns on mouse support
entirely.
I applied this change, and selecting/copy-mode with the mouse is working again, but scrolling with mouse buttons 4/5 (up/down) are not.
Does scrolling work for others?
Our wiki page has not yet been revised to reflect the 2.1 changes, so while there is a section on mouse scrolling there, it is not relevant to v2.1. I'm also not having any luck finding any other discussions of this via web searches, as few others are using tmux 2.1 yet.
EDIT: It seems scrolling works, but *only* when already in copy mode. In the previous version of tmux I was able to scroll whether or not I was in copy mode. I tried binding WheelUp to enter copy mode, but unless I'm missing something, mouse buttons can only be bound over pane borders or the status bar, so this doesn't work (there is no WheelUp event to be bound, only WheelUpPane or WheelUpStatus).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
I'm having the same experience if it counts for anything, just updated my tmux.conf with today to re-enable mouse use, and cannot scroll except for within selecting mode... Would love to have it back the way it was also!
Offline
I can confirm this, and it's pretty annoying.
However I got the old behaviour back (almost) with this:
I used to have "mode-mouse on" to be able to enter (and leave) copy mode with the mouse. (Turning the wheel scrolled three-line-wise.)
I almost have this back with
bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M bind -n WheelDownPane select-pane -t= \; send-keys -M
Now it scrolls line-wise, which is even more smoothly.
I also configured Ctrl as a speedup-key like this:
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
and
bind -t vi-copy C-WheelUpPane halfpage-up bind -t vi-copy C-WheelDownPane halfpage-down bind -t emacs-copy C-WheelUpPane halfpage-up bind -t emacs-copy C-WheelDownPane halfpage-down
Unfortunately bindings to Shift- or Meta-Wheel seem not to work.
Thomas
EDIT Actually I'm happier with this one now
EDIT 2 Actually I'm not quite sure I understood your problem. With abovementioned solution I can position my mouse over a pane, and it will focus the pane, enter copy-mode, and scroll. And it's WheelUpPane/WheelDownPane.
Last edited by ayekat (2015-10-21 17:26:42)
Offline
D'Oh - the main part of my problem binding the mouse wheel to enter copy mode was that I forgot the '-n' flag for bind. With the -n flag it works acceptably, and the -e for copymode has it working perfectly. Thanks.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
Sorry about the reply on a Solved thread, but i found this settings behave more like in tmux <2.1
set-option -g -q mouse on
bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
bind-key -t vi-copy PPage page-up
bind-key -t vi-copy NPage page-down
Source: https://www.reddit.com/r/tmux/comments/ … ed/cw552qd
Archlinux X86_64
Offline
I realize i'm posting in a 2-month-old solved post but it's the first one google finds so i think it belongs here.
There was a ticket on the official github: https://github.com/tmux/tmux/issues/145
The solution proposed there is
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
This works better for me than the solutions i found in this thread.
no place like /home
github
Offline
You are right @demian, works better and avoid problem with vim (with the other solution, when you scroll vim pane, it lose "focus", then no more vim commands work). Like pokemon, I choose you! XD thanks
[EN] In the world there are 10 kinds of people, those who understand binary and those who not.
[ES] En el mundo hay 10 tipos de personas, las que entienden binario y las que no.
Offline
I realize i'm posting in a 2-month-old solved ... i think it belongs here.
I agree. Useful information can always be posted. I never noticed the issue you mention as I'd never think of touching a mouse while in vim!
But I can confirm this solution does work better in those cases.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online