How to Turn on Mouse and Scroll on tmux
Since I am still in the process of moving projects over from Pi, one of the big issues at hand is keeping tabs on the scripts I wrote. As much as I’d like to believe all my databases live on SSD, they don’t. HDDs are frustratingly slow, and the modern databases are designed around it. It’s really the matter of time. Using tmux, one does not need to worry about keeping the ssh session alive.
Compared to my Terminal setup, tmux does have its quirks. One such issue is mouse and scroll support. If you have used the program, you would know immediately what I am referring to. By any means, if I accidentally scroll on tmux window, it types bunch of special characters into the window. I can understand where it might be handy, but coming from a Terminal window on GUI, I would prefer to use tmux with scrolls as well.
On the tmux window that is already running (it doesn’t need to be set before it starts), simply type ctrl+b, followed by : (colon). It will open up a yellow line at the bottom. And type in the following: set -g mouse on. It will enable mouse and scroll on immediately without needing to restart precious session. If you wish to make this option permanent, add the same line to ~/.tmux.conf file.

Comments will be automatically closed after 30 days.