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

Feature request: create new profile from .lnk file #1793

Open
Tracked by #13392
MicheleCicciottiWork opened this issue Jul 3, 2019 · 3 comments
Open
Tracked by #13392

Feature request: create new profile from .lnk file #1793

MicheleCicciottiWork opened this issue Jul 3, 2019 · 3 comments
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Milestone

Comments

@MicheleCicciottiWork
Copy link

Summary of the new feature/enhancement

Development environments, such as Visual Studio, SDKs, etc. install shortcuts that open command prompts with a pre-configured environment (e.g. "x64 Native Tools Command Prompt for VS 2019"). It's tedious and error prone to copy settings from these shortcuts. Terminal should do it automatically, either on a shortcut-by-shortcut basis, or even better letting you dynamically import a whole directory of shortcuts

Proposed technical implementation details

Until Terminal has a UI for creating and editing profiles, this feature will simply involve changes to the schema of profiles.json

I propose a new key for profile dictionaries, let's call it "importDefaultsFromLnk", which can specify a path to a shell link (.lnk) file. A profile can contain a single importDefaultsFromLnk field and nothing else, and all settings will come from the shell link and its NT_CONSOLE_PROPS and NT_FE_CONSOLE_PROPS data blocks (except those that don't make sense for Terminal, of course, like NT_CONSOLE_PROPS::dwWindowOrigin); the name field would default to the file's display name (IShellItem::GetDisplayName), so that it would automatically hide the extension and/or load a localized description that might be present. If other profile fields are explicitly specified, they'll override settings from the shell link. A null value for a field could be used to mean "override with the Terminal default"

Importing a set of shortcuts from a directory (e.g. all shortcuts in Programs folder "Visual Studio 2019\Visual Studio Tools\VC", or even better all shortcuts under "Visual Studio 2019\Visual Studio Tools", recursively) could be done naively, with a profile field that we might call "importProfilesFromDirectory", but unlike importing a single shortcut this feature has non-trivial implications, including but not limited to:

  • should profiles imported from a directory be grouped in a sub-menu of the "new tab" menu?
  • what about recursively imported profiles? should there be sub-sub-menus?
  • how do we specify a dynamically imported profile in globals\defaultProfile?
@MicheleCicciottiWork MicheleCicciottiWork added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jul 3, 2019
@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 Jul 3, 2019
@zadjii-msft
Copy link
Member

zadjii-msft commented Jul 3, 2019

Would this make more sense as a tool to try and turn a shortcut into a profile you could put in your profiles.json, as opposed to something built in? That would have the downside of not syncing the settings with the shortcut, but it would leave all of the terminal settings in one place. I'd be wary of running something like this on every launch, since it might dramatically reduce startup time - something we're discussing over in #1258.

I don't hate this idea, and it's definitely unique enough to stand on its own. That being said, I'd want to flush it out more before someone goes hog wild implementing it.

@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Product-Terminal The new Windows Terminal. labels Jul 3, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 3, 2019
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Jul 3, 2019
@DHowett-MSFT
Copy link
Contributor

I think it would be very cool if our settings supported a one-way "import .lnk". It shouldn't have to be a separate tool, since we've got all the code in the codebase right now, in C++, so we could just make it a shared component.

I do agree with the Terminal Backlog milestone, though.

@DHowett-MSFT DHowett-MSFT changed the title Import profiles from shortcuts and/or folders Feature request: create new profile from .lnk file Jul 8, 2019
@DHowett-MSFT
Copy link
Contributor

Probably dependent on #1564.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants