Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to scroll with mouse in tmux (not history, but terminal output)

Tags:

tmux

This seemingly simple question, is one I cannot find an answer to. The solutions suggesting adding

setw -g mouse on

into the config, do not work. Yes, the mouse works, but on history. Not on the shell output. I cannot understand the logic behind this... why is this the default? Lets say I issue an ls command. I need to scroll to see the entire output, but tmux prevents this.

EDIT:

I would also like to know why is this the default behavior? What prevents it from behaving like other terminals do?

like image 713
LeastSquaresWonderer Avatar asked Jan 22 '26 05:01

LeastSquaresWonderer


1 Answers

Two items to be aware of:

Regarding the comment that you posted

  1. setw -g mouse on

    ^ Works on my machine; I am guessing it fails in your config.

    To test locally: go to tmux and type:

    <leader> colon

    For my setup that is ctrl b :

    That puts you in command mode.

    Now paste: setw -g mouse on

    Use the same process to toggle it off setw -g mouse on and verify that there is a difference.

If your problem still is not solved: (at-least on a mac terminal) Try step #2

  1. Ensure that mouse reporting is checked

    See image:

enter image description here

Hope that helps, your question helped me with my configs. :)

like image 120
Michael Dimmitt Avatar answered Jan 27 '26 02:01

Michael Dimmitt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!