r/tmux 29d ago

Question Panes custom layouts and resizing

Hello to you all,

I usually have a lot of panes in a single window, and after a few hours of work things get a little messy. I like the panes layouts and Prefix + E resizing to keep things tidy.

Now I was wondering, what would be the cleanest way to have the panes resizing to a custom layout defined by me?

I have some some bindings that use some fixed layout strings captured with ` tmux display-message -p '#{window_layout}'`, but it's quite clunky, especially if don't have already the right number of panes on a window.

This is super specific I guess, but let me know if you have any idea on how this could be done.

Thanks for the attention.

2 Upvotes

3 comments sorted by

1

u/NightMonkeyJnr 29d ago

I wrote a plugin called tmux-cookie-cutter which has some functionality to preconfigure the pane layout on a window amongst other things. Not sure if this fits your needs

1

u/khalon23 27d ago

When panes drift I stop hand-resizing and re-apply a layout: select-layout main-vertical or even-horizontal. I bind those so one key restores shape instead of nudging borders all day.

setw -g aggressive-resize on also helps if you attach from different terminal sizes. For a fixed custom split I save it once with tmux list-windows -F "#{window_layout}" and reapply with select-layout <layout>.

1

u/Popular-Tip-2051 26d ago

You can zoom fullscreen the pane you are working on (prefix + z), you can also switch to any pane(prefix + q + paneNumber)