wakeupbuddy
wakeupbuddy

Reputation: 1061

tmux: how to adjust the tmux session's width to fit in the terminal panel?

when I re-attach a tmux session, the width of the tmux window is still the previous width and padded with white dots:

screenshot

So my question is how to adjust the tmux width to fit in the terminal panel? The ideal setting would be the tmux session's width is auto-adjusted whenever re-attached.

PS: I am using iterm2 on mac.

EDIT: This is actually answered here: https://stackoverflow.com/a/19280187/1464263

Upvotes: 7

Views: 7031

Answers (2)

zyy
zyy

Reputation: 1574

I have not yet figured out how to do this automatically. But if you use xterm, you can do this manually:

  1. detach from the tmux session,
  2. type resize into your terminal and run it,
  3. return to your session and the window should be resized.

Upvotes: 3

Paul
Paul

Reputation: 13238

Seems like you have another client attached to this session and it's screen width is half your screen width. If you detach that second session those dots should go away.

tmux ls will show you all the sessions.

tmux detach will allow you to detach the session.

Upvotes: 4

Related Questions