News for hackers. Stuff that matters.
Re:A Quick and Easy Guide to Tmux (2015) by monster_group on Tuesday October 29, 2019 @03:54PM (#21391315)
Can anybody tell me how to scroll up in a tmux session? Whether I use mouse scroll wheel or keyboard, on scrolling up all I get is

^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A

Re:A Quick and Easy Guide to Tmux (2015) by rhinoceraptor on Tuesday October 29, 2019 @03:55PM (#21391321)

    set -g mouse on
in your ~/.tmux.conf should do the trick.
Re:A Quick and Easy Guide to Tmux (2015) by reggieband on Tuesday October 29, 2019 @04:47PM (#21391815)
FYI - after you do this on Mac OS you can't copy to the system clipboard from the buffer using mouse unless you push `fn` before you click on the pane.

I think there are workarounds to get from the tmux copy buffer onto the system clipboard but I usually just `Ctrl-b z` to zoom the pane to full-screen, hold down `fn` button to select text, then `Ctrl-C` like normal.

Re:A Quick and Easy Guide to Tmux (2015) by mhink on Tuesday October 29, 2019 @05:19PM (#21392156)
IIRC, this was fixed in the last few releases- it had to do with OS X's weird user-session/permissions management. At the very least, I was able to comment out the following workaround:

    bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
    bind-key -T copy-mode-vi C-j send-keys -X copy-pipe-and-cancel "pbcopy"
    bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
    bind-key -T copy-mode-vi A send-keys -X append-pipe-and-cancel "pbcopy"
Re:A Quick and Easy Guide to Tmux (2015) by raphattack on Tuesday October 29, 2019 @07:13PM (#21393084)
I'm using iTerm2 + tmux:

1. If I click my mouse to drag and select what I want to copy, the selection is copied to the clipboard when I release. Selection is highlighted with a yellow background.

2. If I want to double-click to copy, I just hold down the `option` key, then double click and it is copied to the clipboard. Selection is highlighted with a white background.

In both instances, I don't even need to use `ctrl+c`.

Re:A Quick and Easy Guide to Tmux (2015) by rhinoceraptor on Wednesday October 30, 2019 @07:50AM (#21396630)
Yep, although there are plugins to integrate the tmux clipboard with the system clipboard. I use tmux-yank:

https://github.com/tmux-plugins/tmux-yank

Re:A Quick and Easy Guide to Tmux (2015) by panpanna on Tuesday October 29, 2019 @04:14PM (#21391479)
I don't understand why this is not the default behavior.
Re:A Quick and Easy Guide to Tmux (2015) by 1996 on Tuesday October 29, 2019 @04:25PM (#21391581)
Different mouse settings send different strings.

You may not way to scroll by accident if your application can use scrolling for changing commands like psql

You may want to do mouse scroll only if you initiated scrolling with say Shift+Page Up

(for me, all the above)

Re:A Quick and Easy Guide to Tmux (2015) by johnr2 on Tuesday October 29, 2019 @04:41PM (#21391758)
> I don't understand why this is not the default behavior

I would guess it's because a lot of tmux users don't use a mouse on the text console.

Re:A Quick and Easy Guide to Tmux (2015) by ohazi on Tuesday October 29, 2019 @05:07PM (#21392032)
See my comments here:

https://github.com/ohazi/dotfiles/blob/master/tmux.conf#L69-...

This is what I mean when I say that tmux config is unintuitive. Ideally there should be one or two directives needed to make this work. It took me weeks to get as far as I did, and I'm still not completely happy with it.

Re:A Quick and Easy Guide to Tmux (2015) by pmoriarty on Tuesday October 29, 2019 @05:01PM (#21391988)
Using the keyboard, I just type my prefix key followed by PageUp.

After that, I can use the PageUp, PageDown, arrow keys, and vi movement keys to move around.

I hit the RETURN or ENTER key to exit.

Re:A Quick and Easy Guide to Tmux (2015) by tim58 on Tuesday October 29, 2019 @05:15PM (#21392111)
control-b + pageup control-b + pagedown