I am trying to split the new Windows Terminal into 8 equal panes by running one or more commands.
Recently Microsoft added support for splitting the new Windows Terminal into panes "programmatically" by using the parameters:
split-pane -H or -V (Horizontal or Vertical pane)
I have tried a dozen combinations of the parameters, but it splits the terminal windows "wrong".
Here is an example:
wt `; split-pane -V -p "pwsh" `; split-pane -H -p "pwsh" `; split-pane -V -p "pwsh"
Here is the desired result:
How would I achieve this programmatically? It's possible to do in the Windows Terminal by using hotkeys ALT+SHIFT+MINUS and ALT+SHIFT+PLUS (see screenshot).
A little late but here is a solution
"startupActions": "-p \"Bash\" ; split-pane -p \"Bash\" -V ; move-focus left ; split-pane -p \"Bash\" -H ; move-focus right;split-pane -p \"Bash\" -H ; move-focus up ; move-focus left ; split-pane -p \"Bash\" -V ; move-focus down ; split-pane -p \"Bash\" -V ; move-focus right ; move-focus up ; split-pane -p \"Bash\" -V move-focus down ; split-pane -p \"Bash\" -V"
It is not the prettiest but it is working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With