mcmire / dotfiles

My personal dotfiles
5 stars 3 forks source link

Add a way to configure the layout of tmux #7

Open mcmire opened 5 years ago

mcmire commented 5 years ago

Usually when working on an external monitor I'll have two panes open: Vim to the left at 66% and tmux to the right at 33%. When switching to a laptop, I'll close this extra pane to give myself more space. The problem is that when switching back to a monitor, I need to reopen this pane, but I can't do this through Vim, I have to do this manually. So I'll type Ctrl-Space h to open a pane, and then I'll use Ctrl-Space L over and over to resize this pane until it's at an appropriate width. However, this is lame and what I really want to do is just run one command that will automatically reset the widths of both panes to 66% and 33%. You can't do this through tmux natively, but I found a script that could potentially solve this problem:

https://devel.tech/tips/n/tMuXrSz9/resize-tmux-main-panes-by-percentage/