Specify Panes in a Profile #5270

Closed
opened 2026-01-31 00:09:12 +00:00 by claunia · 25 comments
Owner

Originally created by @phillip-haydon on GitHub (Nov 28, 2019).

Description of the new feature/enhancement

The ability to save a tab with panes as a profile, or specify in a profile the panes to open when you open that profile.

I Have 6 projects I work on, on a daily basis at work, so I come in, open up ConEmu, and it opens a tab with 6 panes each set to a different git directory. Then I begin working.

So I want to make a project profile which opens up that setup.

Currently being able to make panes is awesome, but I don't want to set it up every time I accidentally close the terminal or I reboot my computer.

(I hope this matches the requirement of the template)

image

image

image

Originally created by @phillip-haydon on GitHub (Nov 28, 2019). # Description of the new feature/enhancement The ability to save a tab with panes as a profile, or specify in a profile the panes to open when you open that profile. I Have 6 projects I work on, on a daily basis at work, so I come in, open up ConEmu, and it opens a tab with 6 panes each set to a different git directory. Then I begin working. So I want to make a `project` profile which opens up that setup. Currently being able to make panes is awesome, but I don't want to set it up every time I accidentally close the terminal or I reboot my computer. (I hope this matches the requirement of the template) ![image](https://user-images.githubusercontent.com/895629/69780576-9fd66680-11e6-11ea-8604-9b2e2bb046a1.png) ![image](https://user-images.githubusercontent.com/895629/69780623-bd0b3500-11e6-11ea-9ad5-708b15bbf622.png) ![image](https://user-images.githubusercontent.com/895629/69780709-f348b480-11e6-11ea-9e09-2a060f2d4664.png)
Author
Owner

@shreedhark commented on GitHub (Jan 16, 2020):

I have similar needs too. Having able to define a profile with multiple panes, their layout and the profile to load in each pane would be really helpful.

This is probably the last thing stopping to switch from ConEmu.

@shreedhark commented on GitHub (Jan 16, 2020): I have similar needs too. Having able to define a profile with multiple panes, their layout and the profile to load in each pane would be really helpful. This is probably the last thing stopping to switch from ConEmu.
Author
Owner

@SergioLuis commented on GitHub (May 20, 2020):

I'd love to see this implemented. I was just looking for it in the 1.0 release, in case I missed it.

@SergioLuis commented on GitHub (May 20, 2020): I'd love to see this implemented. I was just looking for it in the 1.0 release, in case I missed it.
Author
Owner

@JasonWThompson commented on GitHub (Aug 27, 2020):

I would like for this feature to allow the user to configure multiple sub profiles within a profile. I have a test environment which composes of four hosts. I'd like to set up a profile that SSH into all of the hosts in different panes.

@JasonWThompson commented on GitHub (Aug 27, 2020): I would like for this feature to allow the user to configure multiple sub profiles within a profile. I have a test environment which composes of four hosts. I'd like to set up a profile that SSH into all of the hosts in different panes.
Author
Owner

@ali-hk commented on GitHub (Sep 27, 2020):

There are a few ways this could be achieved:

  1. Add a concept of panes to profiles, such that panes can be specified instead of a command line, WSL profile or Azure Terminal profile. The panes then specify the profiles that they use.
    • Drawback to this approach is that it overloads the concept of profiles.
    • Another drawback is that it makes profiles confusing since they become self-referential.
    • Panes could be specified as first, second and split direction, alternatively they could be a list and a split direction where the panes would be evenly split along that axis (but that's harder to do with the existing implementation).
    • Example settings specification:
"profiles": {
    "list": [
        {
            "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
            "hidden": false,
            "name": "Project A",
            "panes": {
                "first": {
                    "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"
                },
                "second": {
                    "panes": {
                        "first": {
                            "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"
                        },
                        "second": {
                            "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"
                        },
                        "split": "vertical"
                    },
                    "split": "horizontal"
                }
            }
        }
    ]
}, ...
  1. Add a concept of startup actions to profiles, similar to the keybinding actions, that get executed as soon as the profile is selected.
    • This adds the flexibility of running other actions aside from just pane management.
    • This extends/reuses the existing concept of actions, so it's easy to learn.
    • Drawback to this approach is that it's a bit hacky and probably not the best choice for the long term.
    • Another drawback is that setting up a layout becomes difficult and unintuitive (ex. an even four way split would require changing the focused pane after splitting twice, like the example below).
    • Example settings specification:
"profiles": {
    "list": [
        {
            "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
            "hidden": false,
            "name": "Project A",
            "startupActions": [
                { "action": "splitPane", "split": "vertical", "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"},
                { "action": "splitPane", "split": "horizontal", "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"},
                { "action": "moveFocus", "direction": "left" },
                { "action": "splitPane", "split": "horizontal", "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"}

            ]
        }
    ]
}
  1. Add a concept of "layouts". Layouts would show up beneath profiles in the menu and would be a separate element in the settings file.
    • Each Layout would specify the panes that comprise it (let's call it a LayoutPane) as well as metadata (name, icon, etc.)
    • Each LayoutPane would specify the profile that should be used for that pane (or specify a profile inline) similar to the existing splitPane action. By separating the concept of layouts from profiles, profiles can easily be used in this way without ambiguous or confusing cases.
    • Example settings specification:
"layouts": 
    [
        {
            "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
            "hidden": false,
            "name": "Project A",
            "panes": {
                "first": {
                    "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"
                },
                "second": {
                    "panes": {
                        "first": {
                            "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"
                        },
                        "second": {
                            "commandline": "powershell.exe",
                            "startingDirectory": "%USERPROFILE%\\git\\ProjectA"
                        },
                        "split": "vertical"
                    },
                    "split": "horizontal"
                }
            }
        }
    ]
}
@ali-hk commented on GitHub (Sep 27, 2020): There are a few ways this could be achieved: 1. Add a concept of panes to profiles, such that panes can be specified instead of a command line, WSL profile or Azure Terminal profile. The panes then specify the profiles that they use. - Drawback to this approach is that it overloads the concept of profiles. - Another drawback is that it makes profiles confusing since they become self-referential. - Panes could be specified as first, second and split direction, alternatively they could be a list and a split direction where the panes would be evenly split along that axis (but that's harder to do with the existing implementation). - Example settings specification: ```jsonc "profiles": { "list": [ { "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", "hidden": false, "name": "Project A", "panes": { "first": { "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}" }, "second": { "panes": { "first": { "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}" }, "second": { "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}" }, "split": "vertical" }, "split": "horizontal" } } } ] }, ... ``` 2. Add a concept of startup actions to profiles, similar to the keybinding actions, that get executed as soon as the profile is selected. - This adds the flexibility of running other actions aside from just pane management. - This extends/reuses the existing concept of actions, so it's easy to learn. - Drawback to this approach is that it's a bit hacky and probably not the best choice for the long term. - Another drawback is that setting up a layout becomes difficult and unintuitive (ex. an even four way split would require changing the focused pane after splitting twice, like the example below). - Example settings specification: ```jsonc "profiles": { "list": [ { "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", "hidden": false, "name": "Project A", "startupActions": [ { "action": "splitPane", "split": "vertical", "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"}, { "action": "splitPane", "split": "horizontal", "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"}, { "action": "moveFocus", "direction": "left" }, { "action": "splitPane", "split": "horizontal", "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"} ] } ] } ``` 3. Add a concept of "layouts". Layouts would show up beneath profiles in the menu and would be a separate element in the settings file. - Each Layout would specify the panes that comprise it (let's call it a LayoutPane) as well as metadata (name, icon, etc.) - Each LayoutPane would specify the profile that should be used for that pane (or specify a profile inline) similar to the existing `splitPane` action. By separating the concept of layouts from profiles, profiles can easily be used in this way without ambiguous or confusing cases. - Example settings specification: ```jsonc "layouts": [ { "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", "hidden": false, "name": "Project A", "panes": { "first": { "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}" }, "second": { "panes": { "first": { "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}" }, "second": { "commandline": "powershell.exe", "startingDirectory": "%USERPROFILE%\\git\\ProjectA" }, "split": "vertical" }, "split": "horizontal" } } } ] } ```
Author
Owner

@zadjii-msft commented on GitHub (Oct 1, 2020):

That's a great writeup @ali-hk. I think this thread needs to be better linked up to #1571, because I've been doing most of the planning for this feature in that thread unfortunately.

I think the plan of record right now is to have the user be able to specify arbitrary actions in the new tab dropdown. This will let the user set something like

"newTabMenu": [
    { 
        "type":"action", 
        "action": { "command": "wt", "commandline": "split-pane -p cmd ; split-pane -p PowerShell" }
    },
} 

Which would create an entry in the new tab menu which would create two new splits, with cmd and PowerShell. In the future, this might be a bit more ergonomic (rather than using the wt commandline args), but this'll work for now.

Right now, I do something similar to create a command in the command palette that opens a bunch of tabs and splits for me:


{ 
    "command": 
    { 
        "action": "wt", 
        "commandline": "new-tab --title OpenConsole cmd.exe /k #work 15 ; split-pane --title OpenConsole cmd.exe /k #work 15 ; split-pane -H cmd.exe /k media-commandline ; 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" 
},
@zadjii-msft commented on GitHub (Oct 1, 2020): That's a great writeup @ali-hk. I think this thread needs to be better linked up to #1571, because I've been doing most of the planning for _this_ feature in _that_ thread unfortunately. I think the plan of record right now is to have the user be able to specify arbitrary actions in the new tab dropdown. This will let the user set something like ```jsonc "newTabMenu": [ { "type":"action", "action": { "command": "wt", "commandline": "split-pane -p cmd ; split-pane -p PowerShell" } }, } ``` Which would create an entry in the new tab menu which would create two new splits, with cmd and PowerShell. In the future, this might be a bit more ergonomic (rather than using the `wt` commandline args), but this'll work for now. Right now, I do something similar to create a command in the command palette that opens a bunch of tabs and splits for me: ```json { "command": { "action": "wt", "commandline": "new-tab --title OpenConsole cmd.exe /k #work 15 ; split-pane --title OpenConsole cmd.exe /k #work 15 ; split-pane -H cmd.exe /k media-commandline ; 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" }, ```
Author
Owner

@reginbald commented on GitHub (Oct 22, 2020):

Any news on this feature request?

@reginbald commented on GitHub (Oct 22, 2020): Any news on this feature request?
Author
Owner

@zadjii-msft commented on GitHub (Oct 22, 2020):

@reginbald Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button?
image
That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

@zadjii-msft commented on GitHub (Oct 22, 2020): @reginbald Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button? ![image](https://user-images.githubusercontent.com/18356694/91237459-5cbb0c80-e700-11ea-9347-b9b1ec2813b1.png) That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️
Author
Owner

@chengB12 commented on GitHub (Nov 25, 2020):

This feature is what I want too.

Also besides using profiles, I hope this can be achieved through command line / command palette without need to create complex profile:

i.e. I want to create following pattern with single command/click

 +-----+-----+
 |     |     |
 +-----+-----+
 |     |     |
 +-----+-----+

however, if I use wt; sp; sp; sp, it will create something like this

 +-----+-----+
 |     |     |
 +     +-----+
 |     |  |  |
 +-----+-----+

An ability to specify source pane in split-pane subcommand would be welcome

@chengB12 commented on GitHub (Nov 25, 2020): This feature is what I want too. Also besides using profiles, I hope this can be achieved through command line / command palette without need to create complex profile: i.e. I want to create following pattern with single command/click ``` +-----+-----+ | | | +-----+-----+ | | | +-----+-----+ ``` however, if I use wt; sp; sp; sp, it will create something like this ``` +-----+-----+ | | | + +-----+ | | | | +-----+-----+ ``` An ability to specify source pane in split-pane subcommand would be welcome
Author
Owner

@skotekar commented on GitHub (Jan 30, 2021):

Any updates updates on this? this is a much needed feature. Right now I am using a windows shortcut as a work around

wt.exe -d D:\Projects\app1 ; -M sp -V -d D:\Users\skotekar\Desktop; sp -H -d D:\Projects\app2; ft -t 0

There are two limitations with this

  1. I cannot pin this to the taskbar. If I pin the shortcut to taskbar and launch it, the running app shows up as a different icon on the task bar
  2. I cannot add another pane to this to make 4 equal panes in each corner. However I think this is probably another feature that is already being worked on separately.
@skotekar commented on GitHub (Jan 30, 2021): Any updates updates on this? this is a much needed feature. Right now I am using a windows shortcut as a work around `wt.exe -d D:\Projects\app1 ; -M sp -V -d D:\Users\skotekar\Desktop; sp -H -d D:\Projects\app2; ft -t 0` There are two limitations with this 1. I cannot pin this to the taskbar. If I pin the shortcut to taskbar and launch it, the running app shows up as a different icon on the task bar 2. I cannot add another pane to this to make 4 equal panes in each corner. However I think this is probably another feature that is already being worked on separately.
Author
Owner

@Don-Vito commented on GitHub (Jan 30, 2021):

@skotekar - for the first bullet please see if startupActions that were added in 1.6 preview help you.

@Don-Vito commented on GitHub (Jan 30, 2021): @skotekar - for the first bullet please see if `startupActions` that were added in 1.6 preview help you.
Author
Owner

@shreedhark commented on GitHub (Jan 30, 2021):

@skotekar - for the first bullet please see if startupActions that were added in 1.6 preview help you.

Yup, I could take the same command I pass to wt.exe and put it in startupActions and it works fine in 1.6 preview. Although, making this part of profile definition in future will be a better way to do it.

Thanks

@shreedhark commented on GitHub (Jan 30, 2021): > @skotekar - for the first bullet please see if `startupActions` that were added in 1.6 preview help you. Yup, I could take the same command I pass to wt.exe and put it in `startupActions` and it works fine in 1.6 preview. Although, making this part of profile definition in future will be a better way to do it. Thanks
Author
Owner

@noooonee commented on GitHub (Apr 16, 2021):

This feature is what I want too.

Also besides using profiles, I hope this can be achieved through command line / command palette without need to create complex profile:

i.e. I want to create following pattern with single command/click

 +-----+-----+
 |     |     |
 +-----+-----+
 |     |     |
 +-----+-----+

however, if I use wt; sp; sp; sp, it will create something like this

 +-----+-----+
 |     |     |
 +     +-----+
 |     |  |  |
 +-----+-----+

An ability to specify source pane in split-pane subcommand would be welcome

So far the best command I can get is like:

wt.exe -d d:\home ; split-pane wsl.exe ~ ; move-focus left ; split-pane wsl.exe ~ ; move-focus right;  split-pane wsl.exe ~
@noooonee commented on GitHub (Apr 16, 2021): > This feature is what I want too. > > Also besides using profiles, I hope this can be achieved through command line / command palette without need to create complex profile: > > i.e. I want to create following pattern with single command/click > > ``` > +-----+-----+ > | | | > +-----+-----+ > | | | > +-----+-----+ > ``` > > however, if I use wt; sp; sp; sp, it will create something like this > > ``` > +-----+-----+ > | | | > + +-----+ > | | | | > +-----+-----+ > ``` > > An ability to specify source pane in split-pane subcommand would be welcome So far the best command I can get is like: ``` wt.exe -d d:\home ; split-pane wsl.exe ~ ; move-focus left ; split-pane wsl.exe ~ ; move-focus right; split-pane wsl.exe ~ ```
Author
Owner

@itpropro commented on GitHub (Aug 4, 2021):

This is already fine for creating quite complex layouts, but is there any command already to resize a specific pane (analogue to Shift+Alt+ArrowKey)?

@itpropro commented on GitHub (Aug 4, 2021): This is already fine for creating quite complex layouts, but is there any command already to resize a specific pane (analogue to Shift+Alt+ArrowKey)?
Author
Owner

@SkyLeach commented on GitHub (Feb 24, 2022):

This is already fine for creating quite complex layouts, but is there any command already to resize a specific pane (analogue to Shift+Alt+ArrowKey)?

I just checked (Version: 1.11.3471.0) and not that I see. Is there any reason those commands can't be duplicated as-is but allow input of a relative size by measure (pixel, character (font size col/row))?

@SkyLeach commented on GitHub (Feb 24, 2022): > This is already fine for creating quite complex layouts, but is there any command already to resize a specific pane (analogue to Shift+Alt+ArrowKey)? I just checked (Version: 1.11.3471.0) and not that I see. Is there any reason those commands can't be duplicated as-is but allow input of a relative size by measure (pixel, character (font size col/row))?
Author
Owner

@ScottBeeson commented on GitHub (Jan 23, 2023):

This is just about the only thing keeping me from switching away from Cmder/ConEmu. Personally, I'd just like a "Save as profile" option.

@ScottBeeson commented on GitHub (Jan 23, 2023): This is just about the only thing keeping me from switching away from Cmder/ConEmu. Personally, I'd just like a "Save as profile" option.
Author
Owner

@zadjii-msft commented on GitHub (Jan 23, 2023):

FWIW, you can do something similar today with the Command Palette and the multipleActions action. It won't be able to appear in the new tab dropdown till we complete this issue, but the Command Palette is arguably a better UI 😉

From the docs:


Run multiple actions

This action allows the user to bind multiple sequential actions to one command.

Command name: multipleActions

Parameters

Name Necessity Accepts Description
actions Required Array of Actions The list of action to run.

Example

{ "name": "Create My Layout", "command": { 
    "action": "multipleActions",
    "actions": [
        // Create a new tab with 3 panes
        { "action": "newTab", "tabTitle": "Work", "colorScheme": "One Half Dark" },
        { "action": "splitPane", "split": "vertical", "profile": "Windows PowerShell", "tabTitle": "Work", "colorScheme": "Campbell Powershell", },
        { "action": "splitPane", "split": "horizontal", "profile": "Windows PowerShell", "tabTitle": "Work", "colorScheme": "Campbell Powershell", },

        // Create a second tab
        { "action": "newTab", "tabTitle": "Misc"},

        // Go back to the first tab and zoom the first pane
        { "action": "prevTab", "tabSwitcherMode": "disabled" },
        { "action": "moveFocus", "direction": "first"},
        "togglePaneZoom"
        ]
}}

@zadjii-msft commented on GitHub (Jan 23, 2023): FWIW, you can do something _similar_ today with the Command Palette and the `multipleActions` action. It won't be able to appear in the new tab dropdown till we complete this issue, but the Command Palette is arguably a better UI :wink: From the docs: <hr> ## [Run multiple actions](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#run-multiple-actions) This action allows the user to bind multiple sequential actions to one command. **Command name:** `multipleActions` #### Parameters | Name | Necessity | Accepts | Description | | ---- | --------- | ------- | ----------- | | `actions` | Required | Array of Actions | The list of `action` to run. | #### Example ```jsonc { "name": "Create My Layout", "command": { "action": "multipleActions", "actions": [ // Create a new tab with 3 panes { "action": "newTab", "tabTitle": "Work", "colorScheme": "One Half Dark" }, { "action": "splitPane", "split": "vertical", "profile": "Windows PowerShell", "tabTitle": "Work", "colorScheme": "Campbell Powershell", }, { "action": "splitPane", "split": "horizontal", "profile": "Windows PowerShell", "tabTitle": "Work", "colorScheme": "Campbell Powershell", }, // Create a second tab { "action": "newTab", "tabTitle": "Misc"}, // Go back to the first tab and zoom the first pane { "action": "prevTab", "tabSwitcherMode": "disabled" }, { "action": "moveFocus", "direction": "first"}, "togglePaneZoom" ] }} ``` <br />
Author
Owner

@fomrat commented on GitHub (May 25, 2023):

Does "It won't be able to appear in the new tab dropdown till we complete this issue" mean that adding a multipleActions to my settings.json will have no effect right now, or can I execure it even if it dpesn't appear in the new tab dropdown?

@fomrat commented on GitHub (May 25, 2023): Does "It won't be able to appear in the new tab dropdown till we complete this issue" mean that adding a multipleActions to my settings.json will have no effect right now, or can I execure it even if it dpesn't appear in the new tab dropdown?
Author
Owner

@AdrianoCahete commented on GitHub (Jan 30, 2024):

i.e. I want to create following pattern with single command/click

 +-----+-----+
 |     |     |
 +-----+-----+
 |     |     |
 +-----+-----+

So far the best command I can get is like:

wt.exe -d d:\home ; split-pane wsl.exe ~ ; move-focus left ; split-pane wsl.exe ~ ; move-focus right;  split-pane wsl.exe ~

Today, with 1.19.3172.0 I get this exactly layout with multipleActions setting, as said before:

{ 
  "name": "Development", "command": { 
    "action": "multipleActions",
      "actions": [
        { "action": "splitPane", "split": "right", "profile": "PowerShell"},
        { "action": "splitPane", "split": "down", "profile": "PowerShell"},
        { "action": "moveFocus", "direction": "left"},
        { "action": "splitPane", "split": "down", "profile": "PowerShell" },
        { "action": "moveFocus", "direction": "up"},
    ]
  }
},

To help me with command palette, I changed it to F1:

{
  "command": 
    {
      "action": "commandPalette"
    },
  "keys": "f1"
}

startupActions is not working for me with the setup, but command palette + multipleActions already helps me.

@AdrianoCahete commented on GitHub (Jan 30, 2024): > > i.e. I want to create following pattern with single command/click > > ``` > > +-----+-----+ > > | | | > > +-----+-----+ > > | | | > > +-----+-----+ > > ``` > > So far the best command I can get is like: > > ``` > wt.exe -d d:\home ; split-pane wsl.exe ~ ; move-focus left ; split-pane wsl.exe ~ ; move-focus right; split-pane wsl.exe ~ > ``` Today, with `1.19.3172.0` I get this exactly layout with [multipleActions](https://learn.microsoft.com/en-us/windows/terminal/customize-settings/actions#run-multiple-actions) setting, as said before: ``` { "name": "Development", "command": { "action": "multipleActions", "actions": [ { "action": "splitPane", "split": "right", "profile": "PowerShell"}, { "action": "splitPane", "split": "down", "profile": "PowerShell"}, { "action": "moveFocus", "direction": "left"}, { "action": "splitPane", "split": "down", "profile": "PowerShell" }, { "action": "moveFocus", "direction": "up"}, ] } }, ``` To help me with command palette, I changed it to F1: ``` { "command": { "action": "commandPalette" }, "keys": "f1" } ``` `startupActions` is not working for me with the setup, but command palette + `multipleActions` already helps me.
Author
Owner

@fomrat commented on GitHub (Jan 30, 2024):

Are you nesting your actions block ("Development") within the context of the overall "actions" array? I'm still getting an "Incorrect type. Expected "object"." on the bracket in:
"action": "multipleActions",
"actions": [

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema-preview",
    
    "actions": [
        { 
            "name": "Development", "command": { 
              "action": "multipleActions",
                "actions": [
                  { "action": "splitPane", "split": "right", "profile": "PowerShell"},
                  { "action": "splitPane", "split": "down", "profile": "PowerShell"},
                  { "action": "moveFocus", "direction": "left"},
                  { "action": "splitPane", "split": "down", "profile": "PowerShell" },
                  { "action": "moveFocus", "direction": "up"}
              ]
            }
          },
        {
            "command": {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": "paste",
            "keys": "ctrl+v"
        },
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        {
            "command": {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+d"
        }
    ],
@fomrat commented on GitHub (Jan 30, 2024): Are you nesting your actions block ("Development") within the context of the overall "actions" array? I'm still getting an "Incorrect type. Expected "object"." on the bracket in: _"action": "multipleActions", "actions": [_ ``` { "$help": "https://aka.ms/terminal-documentation", "$schema": "https://aka.ms/terminal-profiles-schema-preview", "actions": [ { "name": "Development", "command": { "action": "multipleActions", "actions": [ { "action": "splitPane", "split": "right", "profile": "PowerShell"}, { "action": "splitPane", "split": "down", "profile": "PowerShell"}, { "action": "moveFocus", "direction": "left"}, { "action": "splitPane", "split": "down", "profile": "PowerShell" }, { "action": "moveFocus", "direction": "up"} ] } }, { "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+c" }, { "command": "paste", "keys": "ctrl+v" }, { "command": "find", "keys": "ctrl+shift+f" }, { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" } ], ```
Author
Owner

@zadjii-msft commented on GitHub (Jan 30, 2024):

That's bizarre. That should absolutely work. Which version are you on? By all accounts, the json above should just work...

@zadjii-msft commented on GitHub (Jan 30, 2024): That's bizarre. That should absolutely work. Which version are you on? By all accounts, the json above should just work...
Author
Owner

@fomrat commented on GitHub (Jan 30, 2024):

I agree that it's bizarre ;-)

Version 1.19.3172.0.

Clipboard02
Clipboard03

@fomrat commented on GitHub (Jan 30, 2024): I agree that it's bizarre ;-) Version 1.19.3172.0. ![Clipboard02](https://github.com/microsoft/terminal/assets/37964127/98b4e3e5-2055-448f-89ad-af4ca440e385) ![Clipboard03](https://github.com/microsoft/terminal/assets/37964127/faddd115-50c6-4511-831e-e98a5d197c39)
Author
Owner

@zadjii-msft commented on GitHub (Jan 30, 2024):

Oh, it's just the schema that's wrong? That's not the end of the world - the terminal should still work, even if VsCode complains. The schema has always been more of "guidelines" than actual rules.

a2bb3136bb/doc/cascadia/profiles.schema.json (L1490-L1511)

I can't say I know enough about json schema rules to understand why that doesn't work though

@zadjii-msft commented on GitHub (Jan 30, 2024): Oh, it's just the schema that's wrong? That's not the end of the world - the terminal should still work, even if VsCode complains. The schema has always been [more of "guidelines" than actual rules](https://i.imgflip.com/1suyyk.gif). https://github.com/microsoft/terminal/blob/a2bb3136bb52c253060aa281396dbd12316b33a6/doc/cascadia/profiles.schema.json#L1490-L1511 I can't say I know enough about json schema rules to understand why that doesn't work though
Author
Owner

@fomrat commented on GitHub (Jan 30, 2024):

Gee, who'd've thought of actually trying it to see if it works? :-o

I (mistakenly) assumed that if I got squigglies in Code, there was something wrong. Needless to say, the command -- as you suggested -- works just fine.
Clipboard01

@fomrat commented on GitHub (Jan 30, 2024): Gee, who'd've thought of actually trying it to see if it works? :-o I (mistakenly) assumed that if I got squigglies in Code, there was something wrong. Needless to say, the command -- as you suggested -- works just fine. ![Clipboard01](https://github.com/microsoft/terminal/assets/37964127/e092ff06-6257-4c41-ab7c-40a513f3ded2)
Author
Owner

@AdrianoCahete commented on GitHub (Jan 30, 2024):

Tried some other settings and, if I make something wrong, Terminal will warn me and does not load the config file, so seems to be an "error-free zone".

Tip: If you want to load other profiles, like a WSL on the right side and PowerShell on the left, just change the profile key to match the namekey of one of your profile on the list below (normally).

@AdrianoCahete commented on GitHub (Jan 30, 2024): Tried some other settings and, if I make something wrong, Terminal will warn me and does not load the config file, so seems to be an "error-free zone". Tip: If you want to load other profiles, like a WSL on the right side and PowerShell on the left, just change the `profile` key to match the `name`key of one of your profile on the list below (normally).
Author
Owner

@fomrat commented on GitHub (Jan 30, 2024):

Thanks. That was the idea. I have a terminal I open to four boxes (Fedora, Arch, Ubuntu, Raspbian) for demonstrations. I was tired of splitting manually ;-)

@fomrat commented on GitHub (Jan 30, 2024): Thanks. That was the idea. I have a terminal I open to four boxes (Fedora, Arch, Ubuntu, Raspbian) for demonstrations. I was tired of splitting manually ;-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5270