Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scroll bar with tmux #207

Open
michaelklachko opened this issue Nov 18, 2019 · 10 comments
Open

scroll bar with tmux #207

michaelklachko opened this issue Nov 18, 2019 · 10 comments
Labels

Comments

@michaelklachko
Copy link

michaelklachko commented Nov 18, 2019

Hi, this is more of a question: currently when I start tmux in my default WSL console, I can't have a scroll bar. Does wsltty solve this issue? I mean, if I type tmux from wsltty console will I be able to scroll with a mouse? If not, is this something that can be added as a feature? Thanks!

@Biswa96
Copy link
Contributor

Biswa96 commented Nov 18, 2019

Is there any scroll bar with tmux? Generally, I use Ctrl+B then page up or down. See tmux manual page with man tmux.

@michaelklachko
Copy link
Author

Unfortunately not, see tmux/tmux#1976

@Biswa96
Copy link
Contributor

Biswa96 commented Nov 18, 2019

The scroll bar in the window is part of the console (conhost.exe) or the terminal emulator program (mintty, Windows Terminal etc).

@michaelklachko
Copy link
Author

Not sure I understand your answer. Is scroll bar available when I start tmux from wsltty? Can you please check? That would be the only reason for me to switch from the default WSL console to wsltty.

@mintty
Copy link
Owner

mintty commented Nov 18, 2019

Not sure I understand the question. Since tmux is a screen program (i.e. controlling the full terminal screen), how could a scrollbar be useful at all? Or do you mean mouse scrolling being handled by tmux?
Anyway, for enabling/disabling the scrollbar, or for switching mouse modes, the usual control sequences are supported by mintty.

@michaelklachko
Copy link
Author

Yes, I mean mouse scrolling in copy mode. According to tmux devs (see the tmux ticket I opened) the scroll bar is not being handled by tmux, they say a console controls it, and the default WSL console kills the scroll bar as soon as tmux is started.

I'm not familiar with mintty/wsltty, so I would like to know if the same happens here. If not, I will install it.

@michaelklachko
Copy link
Author

To clarify, I want to use the scroll bar when I do scrolling with a mouse. Not just using a scroll wheel on a mouse.

@mintty
Copy link
Owner

mintty commented Nov 18, 2019

So that's not "mouse scrolling"; it's "scrollbar scrolling".
Just speculating, tmux switches to the alternative screen and the scrollbar may be disabled because it's not useful in that mode. Mintty does actually not hide the scrollbar but yet it's not useful in alternative screeen mode. There is no scrollback buffer in that mode and I have no idea what you would expect to happen using the scrollbar. It simply makes no sense because it's only the application controlling the scrolling behaviour, not the terminal.

@michaelklachko
Copy link
Author

I feel there's some misunderstanding here. Let me describe my use case:

  1. I open default WSL console on my Windows 10 machine.
  2. I run some command which produces lots of output, and I can scroll up or down by dragging a scroll bar with my mouse
  3. I ssh to my Ubuntu machine and type tmux (mouse mode is on) - the scroll bar disappears!
  4. I ran some command that produces lots of output
  5. If I want to scroll up, so I press Ctrl + b, [
  6. Now I can press pageup/down to move through the output

Instead of using pageup/down button in step 6, I want to be able to drag a scroll bar with my mouse, just like I did in step 2.
I'm asking you because a tmux dev mentioned that mintty has some "experimental feature" that might let me do that.
I'm not that familiar with either tmux or terminals. I just want to use a scroll bar when I'm in a tmux session. Is this something mintty or wsltty can do for me?

@mintty
Copy link
Owner

mintty commented Nov 19, 2019

OK, use case seen. To use that new mintty feature, applications will need to control it. It cannot work automagically. In fact, there is work in progress for tmux to make use of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants