Feature Request: Save panes layout as a profile which can be opened via the open tab menu #14588

Closed
opened 2026-01-31 04:14:14 +00:00 by claunia · 4 comments
Owner

Originally created by @BenjaminNolan on GitHub (Jul 20, 2021).

Description of the new feature/enhancement

Currently, it's possible to open a layout by creating a shortcut which opens the Terminal with a bunch of CLI options, which is great, however it'd be much nicer and more user-friendly to be able to create a layout directly in the interface by splitting panes and setting their heights and widths with the various keyboard shortcuts, and then clicking a Save as Profile option in the Open Tab drop-down menu which will add it to that drop-down as a future option when opening a new tab.

Proposed technical implementation details (optional)

On the settings.json front, you could do something like this?

{
  "profiles": {
    "list": [
      {
        "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", // The profile I want to use for the actual panes themselves
        "hidden": false,
        "name": "Ubuntu-20.04",
        "source": "Windows.Terminal.Wsl"
      },
      {
        "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}", // The new profile added by saving the custom layout
        "hidden": false,
        "name": "My Custom Layout",
        "source": "Windows.Terminal.Layout"
      }
    ]
  },
  "layouts": {
    "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}": { // Same GUID as the profile, perhaps?
      "panes": [
        {
          "width": 50, // A vertical split pane with three children. I've assumed percentages here rather than columns and rows so everything resizes correctly.
          "children": [
            {
              "height": 50,
              "profile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}" // The id of the profile to open in this pane. In this example, they're all the same, but there's no reason why they couldn't be different.
            },
            {
              "height": 25,
              "profile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}"
            },
            {
              "height": 25,
              "profile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}"
            }
          ]
        },
        {
          "width": 50, // A vertical split pane with two children
          "children": [
            {
              "height": 75,
              "profile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}"
            },
            {
              "height": 25,
              "profile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}"
            }
          ]
        }
      ]
    }
  }
}

That would create this, for example:
Example Windows Terminal multi-pane layout

Apologies if this is a duplicate, I did look through before creating it!

Originally created by @BenjaminNolan on GitHub (Jul 20, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Currently, it's possible to open a layout by creating a shortcut which opens the Terminal with a bunch of CLI options, which is great, however it'd be much nicer and more user-friendly to be able to create a layout directly in the interface by splitting panes and setting their heights and widths with the various keyboard shortcuts, and then clicking a Save as Profile option in the Open Tab drop-down menu which will add it to that drop-down as a future option when opening a new tab. # Proposed technical implementation details (optional) On the `settings.json` front, you could do something like this? ```json { "profiles": { "list": [ { "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", // The profile I want to use for the actual panes themselves "hidden": false, "name": "Ubuntu-20.04", "source": "Windows.Terminal.Wsl" }, { "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}", // The new profile added by saving the custom layout "hidden": false, "name": "My Custom Layout", "source": "Windows.Terminal.Layout" } ] }, "layouts": { "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}": { // Same GUID as the profile, perhaps? "panes": [ { "width": 50, // A vertical split pane with three children. I've assumed percentages here rather than columns and rows so everything resizes correctly. "children": [ { "height": 50, "profile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}" // The id of the profile to open in this pane. In this example, they're all the same, but there's no reason why they couldn't be different. }, { "height": 25, "profile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}" }, { "height": 25, "profile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}" } ] }, { "width": 50, // A vertical split pane with two children "children": [ { "height": 75, "profile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}" }, { "height": 25, "profile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}" } ] } ] } } } ``` That would create this, for example: ![Example Windows Terminal multi-pane layout](https://i.imgur.com/JlDnXOD.png) Apologies if this is a duplicate, I did look through before creating it!
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 04:14:14 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jul 20, 2021):

So for reference, I like to do like the following each time I boot up the Terminal in the morning:

{ "command": { "action": "wt", "commandline": "new-tab --title OpenConsole cmd.exe /k #work 15 ; split-pane -s .30 --title OpenConsole cmd.exe /k #work 15 ; split-pane  -s .25 -H cmd.exe /k media ; new-tab --title \"Symbols Script\" powershell dev\\symbols.ps1 ; new-tab -p \"Ubuntu 18.04\" ; new-tab -p \"microsoft/Terminal\" ; sp -V -p \"microsoft/Terminal\" ; sp -H -p \"microsoft/Terminal\" ; focus-tab -t 0" }, "name": "Good Morning" },

(you could probably make it shorter by replacing new-tab/split-pane with nt/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 than startupActions, 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 #1571.

More specifically though, I think this is roughly /dup #756

@zadjii-msft commented on GitHub (Jul 20, 2021): So for reference, I like to do like the following each time I boot up the Terminal in the morning: ```json { "command": { "action": "wt", "commandline": "new-tab --title OpenConsole cmd.exe /k #work 15 ; split-pane -s .30 --title OpenConsole cmd.exe /k #work 15 ; split-pane -s .25 -H cmd.exe /k media ; new-tab --title \"Symbols Script\" powershell dev\\symbols.ps1 ; new-tab -p \"Ubuntu 18.04\" ; new-tab -p \"microsoft/Terminal\" ; sp -V -p \"microsoft/Terminal\" ; sp -H -p \"microsoft/Terminal\" ; focus-tab -t 0" }, "name": "Good Morning" }, ``` (you could probably make it shorter by replacing `new-tab`/`split-pane` with `nt`/`sp`, respectively). I add that to the `keybindings`/`actions`. This creates a new command in the [Command Palette](https://docs.microsoft.com/en-us/windows/terminal/command-palette) named "Good Morning". That opens up a few tabs & panes, running various build environments. I like having it in a command rather than `startupActions`, 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 #1571. More specifically though, I think this is roughly /dup #756
Author
Owner

@ghost commented on GitHub (Jul 20, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jul 20, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@BenjaminNolan commented on GitHub (Jul 30, 2021):

@zadjii-msft Not sure this is a true duplicate of #756, as it was intended more to be about the ability to create a layout using the split pane commands in an existing tab and then save them as a profile that can be opened later via the commands in the tab dropdown that are mentioned in #1571 (prime number, nice ^^), so that's on me for not really explaining the thought properly, but there is definitely a lot of cross-over between them.

Do you think it's worth mentioning the ability to save the current pane layout in a comment on #1571?

@BenjaminNolan commented on GitHub (Jul 30, 2021): @zadjii-msft Not sure this is a _true_ duplicate of #756, as it was intended more to be about the ability to create a layout using the split pane commands in an existing tab and then save them as a profile that can be opened later via the commands in the tab dropdown that are mentioned in #1571 (prime number, nice ^^), so that's on me for not really explaining the thought properly, but there is definitely a lot of cross-over between them. Do you think it's worth mentioning the ability to save the current pane layout in a comment on #1571?
Author
Owner

@rajhlinux commented on GitHub (Jun 29, 2022):

How are you actually able to do this? I also would like to have a preset settings which will open multiple tabs in certain order where multiple terminals are stacked vertically and horizontally.

@rajhlinux commented on GitHub (Jun 29, 2022): How are you actually able to do this? I also would like to have a preset settings which will open multiple tabs in certain order where multiple terminals are stacked vertically and horizontally.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14588