it is great that one can create new pane using split-window with size specified by percent (-p), however, it seems for resize-pane command, it lacks such way to adjust.
It would be nice to have -p option available to resize command as if I switch tmux from a larger screen to a smaller one, the pane might need also get resized.
my current workaround is to add tmux map that calls tput cols or tput lines to compute height/width and feed into resize. If I write those into a shell script, and call it directly it works. But if it was called through tmux by binding it to a key and then using run-shell, it doesn't show the terminal height/width correctly.
Added this to the TODO file.
Oh you should be able to use session_width, client_width, etc formats to get the current width and height.
Now I am using #{pane_height}. And if I want to resize a pane the same as -p 20, I would need to do:
HEIGHT=$(($(tmux display-message -p '#{pane_height}') / 5))
tmux resize-pane -y $HEIGHT
which seems a little too complex
I use Putty to login to a remote Ubuntu server from windows.
If I log out by disconnecting from tmux (ctrl+b+d) and then log back in to the same session before, the pane sizes change somewhat. Then I have to figure out what the previous pane size was. It would be very helpful if I could set the pane sizes to scale proportionately to whatever the full window height and width
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Now I am using
#{pane_height}. And if I want to resize a pane the same as-p 20, I would need to do:which seems a little too complex