5

Recently, I updated to OS X Yosemite and was delighted to find out Apple has added mouse support to their Terminal app. This works great in a standard Terminal window scrolling through my history and in apps like less. However, when I fire up tmux scrolling with the trackpad scrolls through my command history and not the terminal output.

Here's what my .tmux.conf file looks like:

# INTERFACE

# enable mouse support
set-window-option -g mode-mouse on

# set up the default command to ensure the window's name is empty if it's not already defined and
# to reattach the user namespace to the current shell
set-option -g default-command 'reattach-to-user-namespace -l $SHELL;'

# modify the split pane keyboard shortcuts
unbind %
unbind '"'
bind '"' split-window -h
bind = split-window -v

# rebind the c shortcut so it creates a window with an empty name
bind-key c new-window -n ''

# set the window title to be the current session's name
set -g set-titles on
set -g set-titles-string '#S'
set-window-option -g automatic-rename off

# STATUS BAR

# start counting the window panes at 1 instead of 0
set -g base-index 1
set -g pane-base-index 1

# set up the default colors and font weights
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold

# set up the status left
set -g status-right ""
set -g status-left-length 32
set -g status-left '#[fg=colour235,bg=colour252,bold] #S '

# set up the window status
set -g window-status-format "#[fg=white,bg=colour234] #I: #W "
set -g window-status-current-format "#[fg=colour235,bg=colour39,noreverse,bold] #I: #W "

Thanks in advance for the help!

3
  • I did a bunch of research, found articles like this that could be handy and this blogger's setup but no sign of scroll like you mention. Running iTerm2 on OS X gives some scroll, but not like in the native terminal.
    – mbb
    Commented Nov 3, 2014 at 4:54
  • Also, does this similar post help?
    – mbb
    Commented Nov 3, 2014 at 4:56
  • @mjb Thanks for the reply, but unfortunately that didn't seem to solve the problem. Commented Nov 7, 2014 at 6:50

2 Answers 2

2

I'm also on Yosemite, and I can use the mouse wheel to scroll history once I go into copy mode.

1
  • Thanks for the reply. That takes me one step closer than I was. Commented Nov 7, 2014 at 6:50
1

I came across this question the other day because I had it myself. Just discovered how to fix this. Go to your terminal preferences. Under Profiles->keyboard, at the very bottom is a button that says "Mouse." Click that to open a dialog that allows mouse configuration. Uncheck "Emulate mouse wheel events." Voila!

EDIT: screen shot

Mouse button

That button is strangely placed, as it's kinda over the text. Wondering if it's added by another application. I do use EasySIMBL with MouseTerm. Maybe try adding that? Maybe that option comes from there somehow?

Here's the dialog:

Mouse configuration dialog

5
  • That's awesome that you found a setting, but I don't seem to see it in my Terminal preferences. What version of OS X are you running? Commented Jun 30, 2015 at 22:30
  • @LandonSchropp 10.10.3 Commented Jul 1, 2015 at 1:22
  • 1
    Well, now that I've said all this . . . I updated XCode and now that option is gone AND my terminal no longer scrolls correctly. Awesome. Commented Jul 2, 2015 at 14:19
  • Installing EasySIMBL and MouseTerm did the trick for me. Thanks Andrew! Commented Jul 4, 2015 at 6:14
  • As @tandrewnichols said, after latest XCode update, terminal doesn't scroll correctly (even if you have EasySimbl with MouseTerm-plus). I also reported this issue on MouseTerm-plus tracker - github.com/saitoha/mouseterm-plus/issues/9
    – Lucas
    Commented Jul 12, 2015 at 9:34

You must log in to answer this question.

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