Windows Terminal should pre-open the terminal tabs on startup #17573

Closed
opened 2026-01-31 05:46:21 +00:00 by claunia · 5 comments
Owner

Originally created by @panwarab on GitHub (May 26, 2022).

Description of the new feature/enhancement

I am using windows terminal because it gives browser like experience to juggle different terminals in one consolidated screen, which is a great productivity improver. The one feature I find missing in windows terminal is :-

  1. To pre-define the set of tabs to open on startup with first command to execute on those tabs so that user does not have to manually configure all the tabs (if they work with multiple tabs with multiple purposes from the get go)

The use-case is:-

  1. While working on the product, I need to open different tabs and setup each tab manually which is time consuming and I repeat this step every time I open the new windows terminal/tab.

With the above, I can pre-define how many tabs to open, which type of terminal will it open and which command will it execute so that I don't have to manually do all the tab setup where one tab will point to DB, one tab will be used to SSH into Prod instances, one tab will point to applicationn server, one tab will run smtp server. With the proposed solution, I would be able to give a JSON structure in settings.json, and I believe windows terminal will take care of it in one go.

JSON, like below, could go in settings.json -

openList: {
  `uuid` : [{
commandLine:  startapplnserver.sh
},{
commandLine: startdb.sh
}],
}

Proposed technical implementation details (optional)

I will be happy to look into technical details, if given an opportunity, to add the above feature.

Please let me know if you have more questions. thanks in advance.

Originally created by @panwarab on GitHub (May 26, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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 <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> I am using windows terminal because it gives browser like experience to juggle different terminals in one consolidated screen, which is a great productivity improver. The one feature I find missing in windows terminal is :- 1. To pre-define the set of tabs to open on startup with first command to execute on those tabs so that user does not have to manually configure all the tabs (if they work with multiple tabs with multiple purposes from the get go) The use-case is:- 1. While working on the product, I need to open different tabs and setup each tab manually which is time consuming and I repeat this step every time I open the new windows terminal/tab. With the above, I can pre-define how many tabs to open, which type of terminal will it open and which command will it execute so that I don't have to manually do all the tab setup where one tab will point to DB, one tab will be used to SSH into Prod instances, one tab will point to applicationn server, one tab will run smtp server. With the proposed solution, I would be able to give a JSON structure in settings.json, and I believe windows terminal will take care of it in one go. JSON, like below, could go in settings.json - ``` openList: { `uuid` : [{ commandLine: startapplnserver.sh },{ commandLine: startdb.sh }], } ``` # Proposed technical implementation details (optional) I will be happy to look into technical details, if given an opportunity, to add the above feature. Please let me know if you have more questions. thanks in advance.
Author
Owner

@zadjii-msft commented on GitHub (May 26, 2022):

There's probably a variety of things that could work for your use case here:

Any of those work for you/?

@zadjii-msft commented on GitHub (May 26, 2022): There's probably a variety of things that could work for your use case here: * [`"firstWindowPreference": "persistedWindowLayout"`](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/startup#behavior-when-starting-a-new-terminal-session), which will re-open the tabs you had from a previous session * [`startupActions`](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/startup#startup-actions), which takes a `wt` commandline to use when starting the window for the first time. * A [`multipleActions`](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#run-multiple-actions) action. That creates a new command in the [Command Palette](https://docs.microsoft.com/en-us/windows/terminal/command-palette), which you can use to create that layout at will. Any of those work for you/?
Author
Owner

@panwarab commented on GitHub (May 26, 2022):

hey @zadjii-msft,

Thanks for update. sounds like it might, let me give it a shot.

@panwarab commented on GitHub (May 26, 2022): hey @zadjii-msft, Thanks for update. sounds like it might, let me give it a shot.
Author
Owner

@panwarab commented on GitHub (May 26, 2022):

any docu around configuring multipleActions?

@panwarab commented on GitHub (May 26, 2022): any docu around configuring `multipleActions`?
Author
Owner

@zadjii-msft commented on GitHub (May 27, 2022):

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 (May 27, 2022): ## [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

@ghost commented on GitHub (May 31, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (May 31, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17573