Skip to main content
added 82 characters in body
Source Link
Kamil Maciorowski
  • 24.5k
  • 2
  • 69
  • 129

new-session
[…] With -d, the initial size comes from the global default-size option; -x and -y can be used to specify a different size.

(source)

(Old versions use 80x24 instead of The default default-size is 80x24.) Before customizable default-size was introduced, new-session behaved as if it was 80x24.

What happens is split-window works fine. Then you attach and the layout is recalculated to the new width and height. My observation is tmux tends to keep the size of some pane(s) while resizing, it doesn't keep the relative proportions. I don't think you can change this behavior easily.

Tell new-session to use the size of your terminal:

#!/bin/sh tmux new-session -s abc -d -x "$(tput cols)" -y "$(tput lines)" tmux split-window -p 90 tmux attach -t abc 

new-session
[…] With -d, the initial size comes from the global default-size option; -x and -y can be used to specify a different size.

(source)

(Old versions use 80x24 instead of default-size.)

What happens is split-window works fine. Then you attach and the layout is recalculated to the new width and height. My observation is tmux tends to keep the size of some pane(s) while resizing, it doesn't keep the relative proportions. I don't think you can change this behavior easily.

Tell new-session to use the size of your terminal:

#!/bin/sh tmux new-session -s abc -d -x "$(tput cols)" -y "$(tput lines)" tmux split-window -p 90 tmux attach -t abc 

new-session
[…] With -d, the initial size comes from the global default-size option; -x and -y can be used to specify a different size.

(source)

The default default-size is 80x24. Before customizable default-size was introduced, new-session behaved as if it was 80x24.

What happens is split-window works fine. Then you attach and the layout is recalculated to the new width and height. My observation is tmux tends to keep the size of some pane(s) while resizing, it doesn't keep the relative proportions. I don't think you can change this behavior easily.

Tell new-session to use the size of your terminal:

#!/bin/sh tmux new-session -s abc -d -x "$(tput cols)" -y "$(tput lines)" tmux split-window -p 90 tmux attach -t abc 
Source Link
Kamil Maciorowski
  • 24.5k
  • 2
  • 69
  • 129

new-session
[…] With -d, the initial size comes from the global default-size option; -x and -y can be used to specify a different size.

(source)

(Old versions use 80x24 instead of default-size.)

What happens is split-window works fine. Then you attach and the layout is recalculated to the new width and height. My observation is tmux tends to keep the size of some pane(s) while resizing, it doesn't keep the relative proportions. I don't think you can change this behavior easily.

Tell new-session to use the size of your terminal:

#!/bin/sh tmux new-session -s abc -d -x "$(tput cols)" -y "$(tput lines)" tmux split-window -p 90 tmux attach -t abc