Open zadjii-msft opened 3 years ago
Hi @zadjii-msft I just found your trick and I'm trying to implement it according to my needs, but I'm struggling to do it correctly.
When I run this command,
{ "command": { "action": "wt", "commandline": "nt wsl.exe ; sp -H -s .30 wsl.exe ; sp -V wsl.exe ; sp -V wsl.exe ; focus-tab -t 0" }, "name": "Good Morning" },
I want my session to look like this,
But instead bottom panes are not split equally, and I receive this
Do you know how to make WT to resize panes equally using WT commands?
Or maybe there is a way to preserve a session like in tmux?
@zorgick you can add -s .66
to you first split in the lower section to specify that you want 66% of the space left, which in turn would make the first pane 34% and the last two would split equally at 33%. That's the closest you'll get to a perfect 1/3 split.
We get dupes of microsoft/terminal#766 literally all the time in the main repo. Maybe it would be useful to add a guide on using the command palette /
startupActions
to alleviate that pain. Below is the text I use as a saved reply for these dupes. Someone just needs to massage this into a guide on the Tips and Tricks page.Thanks for the suggestion! Looks like we're tracking this in microsoft/terminal#776.
dup #766
So for reference, I like to do like the following each time I boot up the Terminal in the morning:
(you could probably make it shorter by replacing
new-tab
/split-pane
withnt
/sp
, respectively).I add that to the
keybindings
/actions
. This creates a new command in the Command Palette named "Good Morning". That opens up a few tabs & panes, running various build environments. I like having it in a command rather thanstartupActions
, because I only really want this in one terminal window, not every single one I launch. It's personal taste.You could repeat this for multiple different "session"s if you wanted. That way you could have layouts pre-defined for various different dev environments.
We're also tracking adding commands to the new tab dropdown in microsoft/terminal#1571.