7

I want to create an action or a new profile which opens 4 new tabs in a 2x2 layout. But I've several issues with this:

My profile just won't open inline with the terminal but always in a new window.

I cant get it to render a 2x2 grid but a 1x2 with another break in the last tile.

1x2 grid

Here is the profile I've created. I've tried the same commandline with the newTab action with similar results.

{
    "guid": "{00000000-0000-0000-0000-000000000005}",
    "name": "myProfile",
    "commandline": "wt new-tab -p \"Foo\" ; 
                       split-pane -H -p \"Bar\"  ; 
                       split-pane -V -p \"Baz\" ; 
                       split-pane -H -p \"Git Bash\" -d \"C:\\foo\""
}

For better readability I've added linebreaks to the code above. they are not in my configuration


Update 1:

I was able to solve the issue with the 2x2 pane layout by using the move-focus command. I think this is a preview feature only atm.

{
    "guid": "{00000000-0000-0000-0000-000000000005}",
    "name": "myProfile",
    "commandline": "wt new-tab -p \"Foo\" ;                        
                       split-pane -V -p \"Bar\"  ; 
                       move-focus left ;                       
                       split-pane -H -p \"Baz\" ; 
                       move-focus up ;
                       move-focus right ;
                       split-pane -H -p \"Git Bash\" -d \"C:\\foo\""
}
8
  • Did you try opening with Powershell? Works here. wt -p "Command Prompt" ; split-pane -p "Windows PowerShell" ; split-pane -H wsl.exe From: docs.microsoft.com/en-us/windows/terminal/…
    – John
    Feb 1, 2021 at 0:16
  • @John well. you are only using 3 tabs => won't fix my 2x2 layout issue. aside from that it does also open a new window
    – Brettetete
    Feb 1, 2021 at 2:05
  • The command I used has two tabs (side by side) and one tab below right. It could be set up for four workspaces.
    – John
    Feb 1, 2021 at 2:07
  • I don't understand what you are saying? I'm trying to create a 2x2 grid layout. 4 Panes all equally sized. Can you show me how to do that?
    – Brettetete
    Feb 1, 2021 at 2:10
  • I think you might be correct. I tried 4 panes (split-pane -H and -V) but I still wound up with 3 panes. Sorry, but it looks like my idea will not work for you. I will work on it some more tomorrow.
    – John
    Feb 1, 2021 at 2:16

1 Answer 1

5

This is 4x4 profile in the same window:

{
  "commandline": "wt -w 0 new-tab -p \"Foo\" ; split-pane -V -p \"Bar\"  ; move-focus left ; split-pane -H -p \"Baz\" ; move-focus up ; move-focus right ; split-pane -H -p \"Git Bash\" -d \"C:\\git\"",
  "guid": "{e4554b48-406d-4615-98a0-fadd035e6cac}",
  "hidden": false,
  "name": "4x4"
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .