Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to save a Windows Terminal pane layout as a profile for easy startup #8590

Closed
KasimAhmic opened this issue Dec 15, 2020 · 2 comments
Closed
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@KasimAhmic
Copy link

KasimAhmic commented Dec 15, 2020

Description of the new feature/enhancement

image

In my dev cycles, I usually use 4-6 different pieces of software such as Redis servers, yarn, storybook, NGINX, etc. and it gets to be very tedious launching each of those one after the other. If possible, I'd like to be able to save a "snapshot" or "profile" of my current layout with the directories. From there, it'd be nice to be able to run commands on startup as well so for example, pane 1 launches NGINX in X directory, pane 2 launches Redis in Y directory, pane 3 launches yarn run dev in Z directory, so on and so forth.

This would solve the problem of having to manually launch multiple utilities to get started with your development. As for how the user would use it, I'd imagine a command (ctrl+shift+s) would save the layout and directories in a profile and allow them to launch the profile via the existing profile system.

As a disclaimer, I do know about the wt command with the split-pane option but I've personally not been able to get the configuration I've wanted. This solution would be a bit more user friendly as well so that's a benefit as well. Apologies if this is already an existing feature; if so, please let me know!

Proposed technical implementation details (optional)

The simplest method I can think of would be a launch config in JSON format.

  • name - The name of the profile or layout
  • paneLayout - [X, Y] - Number of columns (X) and rows (Y) to create in the tab
  • paneSettings - The launch config for each pane including the working
    • workingDirectory - The directory to navigate to in this pane
    • launchCommand - Optional command to run in this pane
{
  "name": "Project X Local Dev",
  "paneLayout": [3, 2],
  "paneSettings": [
    {
      "workingDirectory": "C:/Users/developer/project/server",
      "launchCommand": "nginx.exe"
    },
    {
      "workingDirectory": "C:/Users/developer/project/server",
      "launchCommand": "redis.exe"
    },
    {
      "workingDirectory": "C:/Users/developer/project/server",
      "launchCommand": "yarn run dev"
    },
    {
      "workingDirectory": "C:/Users/developer/project/client",
      "launchCommand": "yarn run dev"
    },
    {
      "workingDirectory": "C:/Users/developer/project/client",
      "launchCommand": "yarn storybook"
    }
  ]
}

Edit

I've been able to achieve something similar with the wt command but it's not ideal. It doesn't seem like you're able to focus on individual panes so each horizontal split gets smaller and smaller.

wt -p "PowerShell Core" --title "Project" -d "directory" powershell yarn run dev`;
split-pane -p "PowerShell Core" -H -d "directory" powershell yarn run dev`;
split-pane -p "PowerShell Core" -H -d "directory" powershell yarn run dev`;
split-pane -p "PowerShell Core" -H -d "directory" powershell yarn storybook`;
split-pane -p "PowerShell Core" -H -d "directory" powershell yarn storybook -p 6007;
@KasimAhmic KasimAhmic added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Dec 15, 2020
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Dec 15, 2020
@j4james
Copy link
Collaborator

j4james commented Dec 15, 2020

This sounds a lot like issue #3759.

@KasimAhmic
Copy link
Author

This sounds a lot like issue #3759.

You're absolutely right, I didn't see that issue before but it's asking for the same exact thing. I'll close this issue, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

2 participants