Maximize window in tmux

41

10

tmux shows screen like this:

[root@wpc-fc2 init]#                                      |············
                                                          |············
                                                          |············
[0] 0:bash 3:bash*               "vi@wpc-fc2:/etc/init" 21:04 21-Jun-11

Window has non-maximum width, attempt to copy text from it leads to "|···" getting in text.

How to fix it and get the tmux window full width?

Vi.

Posted 2011-06-21T18:03:57.780

Reputation: 13 705

1If you have an actual console viewing the same screen, then you may be limited to its size. At least this is how it works in GNU Screen. – Randolf Richardson – 2011-06-21T18:16:38.767

Answers

56

tmux windows are limited to the size of the smallest client viewing any session they are linked to (that is, the window is part of).

This can be changed slightly with the aggressive-resize window option which constrains them to the size of the smallest client actually displaying that window.

To get the window back to full size, the best bet is to detach any other clients using that window. Use C-b D to select the clients individually or C-b: attach -d to detach all others on that session.

Bob

Posted 2011-06-21T18:03:57.780

Reputation: 1 326

I found out dwm doesn't care, though. I had a tmux session open in the stack, as well as full in another tag. Opened MoC and it ended up crashing because the smaller terminal wasn't large enough for it. Gotta be more careful in the future. – Rob – 2012-02-07T20:24:43.483

17

Setting aggressive resize option does indeed solve this issue for me (thanks Bob). I added the following to my .tmux.conf:

set-window-option -g aggressive-resize on

oneself

Posted 2011-06-21T18:03:57.780

Reputation: 969