0

I have a server-type setup in tmux, with my main server application to the left and some resource monitors to the right. But I'm accessing the server with a computer that has a very small display, so it can't display a lot of characters at once and the tmux layout gets "squashed" when I connect to the server with the small display. I fixed the squashing issue by running :set-option window-size manual to force the tmux window size to be wide enough for the resource monitors to be readable.

But now, I have a question: If the window-size property is set to manual, then how can I pan around the tmux layout if my screen isn't big enough to view the whole thing at once? Like how you press Ctrl+B + [ to scroll up and down a tmux pane, but for the entire layout in general. I hope you get what I mean.

I am connecting with SSH through GNOME Terminal, if that's useful information. My default shell is zsh. I also use Visual Studio Code's built-in terminal at times, but I don't need manual window sizing when I'm using VSCode terminal.

1 Answer 1

1

When I do prefix ?, I see (among other lines):

C-b S-Up    Move the visible part of the window up
C-b S-Down  Move the visible part of the window down
C-b S-Left  Move the visible part of the window left
C-b S-Right Move the visible part of the window right

C-b is Ctrl+b, the default prefix. S-Up is Shift+. Thus the sequence of keys to move the visible part of the window up is:

Ctrl+b Shift+

Similarly for the other three directions.

I haven't set these sequences up by myself, they must be in the default config; so I believe they should work for you out of the box. tmux -V prints tmux 3.3a for me.


If you want to bind these to some other combinations of keys, it's good to know the actual commands. Invoke tmux list-keys and you will see (among other lines):

bind-key -r -T prefix       S-Up                 refresh-client -U 10
bind-key -r -T prefix       S-Down               refresh-client -D 10
bind-key -r -T prefix       S-Left               refresh-client -L 10
bind-key -r -T prefix       S-Right              refresh-client -R 10

-r here means if you hold the post-prefix combination (e.g. Shift+) then the action will be repeated (if the timings are right, see this question and my answer there).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.