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

Support for "session" #9197

Closed
dov opened this issue Feb 18, 2021 · 6 comments
Closed

Support for "session" #9197

dov opened this issue Feb 18, 2021 · 6 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@dov
Copy link

dov commented Feb 18, 2021

Description of the new feature/enhancement

Mostly, when I run terminal I start with opening a fixed set of tabs, each in a different directory, and each with a different a different title. I'd like a way to automize this.

Proposed technical implementation details (optional)

I suggest that you add to Terminal command line an option to take a json file with the requested layout.

@dov dov added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Feb 18, 2021
@ghost ghost added 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 labels Feb 18, 2021
@skyline75489
Copy link
Collaborator

Would you be satisfied by the solution mentioned in #9101 (comment) ?

@dov
Copy link
Author

dov commented Feb 18, 2021

Would you be satisfied by the solution mentioned in #9101 (comment) ?

That indeed looks promising! It is not clear whether it is possible to do a cd to a different directory through that approach though.

@skyline75489
Copy link
Collaborator

That's largely related to the shells. For example with pwsh.exe you can use:

wt new-tab pwsh.exe -WorkingDirectory D:

@skyline75489
Copy link
Collaborator

By the wt way is actually working with 1.5. You'll need to wait for 1.6 to use the startupActions. Follow #756 for future updates on this topic.

@zadjii-msft
Copy link
Member

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. Largely, I'm going to call this ask a duplicate of both #756 and #1571.

/dup #756
/dup #1571

@ghost
Copy link

ghost commented Feb 18, 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 ghost closed this as completed Feb 18, 2021
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed 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 Feb 18, 2021
This issue was closed.
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. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants