Scroll tmux one line at a time with the mouse wheel
The Config You Need
Add this to your ~/.tmux.conf
file to turn on mouse scrolling that goes one line at a time:
Notes
- It took a surprisingly long time to find this. I found a ton of pages describing options for scrolling in tmux. They rarely mentioned the mouse. None of them showed how to do it one line at a time except the Stack Overflow answer I finally ended up on.
-
Worse, most of the sites I hit looked like this:
The rest of the page was SEO bait talking about what tmux is and why you might want to use it. All different shapes and sizes of ads were scattered between every other paragraph.
It made me realize that one of the appeals of AI answers showing up in search results is to avoid this type bullshit.
- I'm using tmux version 3.5a on a mac. The Stack Overflow answer says it works from at least v2.6.
Scrolling Quality of Life
It took me forever to start using tmux. Longer until daily usage kicked in. Scrolling was a huge blocker. I'm all about hotkeys. But, it's hard to beat the mouse wheel. You know, physical hardware designed specifically for the task.
Now that I've got the scrolling config in place, it's rare that I do anything outside of tmux. It's totally worth experimenting with if you haven't tried it yet. Just know that it'll take some tweaking to get it running the way you like.
-a
References
Home of the terminal multiplexer.
What appears to be the sole page on the internet that shows the config options. (I mean, I know that can't possibly be true, but it sure felt like it.)
The practice of prioritizing content aimed at show up higher in search results rather than content made for our fellow human audience.