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

Open panes with a specific profile #998

Closed
1 of 4 tasks
zadjii-msft opened this issue May 24, 2019 · 2 comments · Fixed by #3825
Closed
1 of 4 tasks

Open panes with a specific profile #998

zadjii-msft opened this issue May 24, 2019 · 2 comments · Fixed by #3825
Assignees
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@zadjii-msft
Copy link
Member

zadjii-msft commented May 24, 2019

You can only open a pane with the default profile

I left space for adding support for opening a specific pane, but it didn't really seem like there was a good keychord for doing this currently. Maybe if we added support for multi-key keychords, then it'd make more sense.

EDIT:

With #3391 merged, this is pretty possible now.

I'd really like for this to work like the following:

    { "command": "splitHorizontal", "keys": [ "alt+shift+-" ] },
    { "command": "splitVertical", "keys": [ "alt+shift+plus" ] },

    { "keys": [ "alt+1" ], "command": { "action": "split", "style": "horizontal" } },
    { "keys": [ "alt+2" ], "command": { "action": "split", "style": "vertical", "profile": "{some-guid}" } },
    { "keys": [ "alt+3" ], "command": { "action": "split", "style": "horizontal", "type": "duplicate" } },
    { "keys": [ "alt+4" ], "command": { "action": "split", "style": "vertical", "type": "prompt" } },

The first two entries are the legacy style keybindings for panes.

The next four represent 4 different ways of opening a new pane:

This issue will track just that second option.

@zadjii-msft zadjii-msft added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label May 24, 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 May 24, 2019
@zadjii-msft zadjii-msft added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels May 24, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 24, 2019
@DHowett-MSFT DHowett-MSFT removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 24, 2019
@zadjii-msft zadjii-msft changed the title Open panes with something other than the default profile Open panes with a specific profile Jul 1, 2019
@invy
Copy link

invy commented Sep 30, 2019

There are few options (inspired by i3)

  1. Popup Dialog:
    Specifig key combinatin will trigger a popup dialog with all profiles, where user can select specific profile.
  2. Ability to rearrange tabs with key combinations (inclusive ability to transform tab into a tile in specific window)
  3. i3 way: enable specifyc tiling mode (vertical/horizontal), then DMenu like: just search for specific profile (or even a specific command, which can be executed in specific profile)...

zadjii-msft added a commit that referenced this issue Nov 28, 2019
## Summary of the Pull Request

We already have "splitHorizontal" and "splitVertical", but those will both be deprecated in favor of "splitPane" with arguments. 

Currently, there's one argument: "style", which is one of "vertical" or "horizontal."

## References
This is being done in pursuit of supporting #607 and #998. I don't really want to lob #998 in with this one, since both that and this are hefty enough PRs even as they are. (I have a branch for #998, but it needs this first)

This will probably conflict with #3658
## PR Checklist
* [ ] Doesn't actually close anything, only enables #998
* [x] I work here
* [ ] Tests added/passed - yea okay no excuses here
* [x] Requires documentation to be updated

## Validation Steps Performed
Added new keybindings with the args - works
Tried the old keybindings without the args - still works
---------------------------------------
* Add a 'splitPane' keybinding that can be used for splitting a pane either vertically or horizontally

* Update documentation too

* Good lord this is important

* Add a test too, though I have no idea if it works

* "style" -> "split"

* pr comments from carlos
@zadjii-msft zadjii-msft self-assigned this Dec 3, 2019
@ghost ghost added the In-PR This issue has a related PR label Dec 3, 2019
@ghost ghost closed this as completed in #3825 Dec 9, 2019
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Dec 9, 2019
ghost pushed a commit that referenced this issue Dec 9, 2019
…errides (#3825)

## Summary of the Pull Request


This enables the user to set a number of extra settings in the `NewTab` and `SplitPane` `ShortcutAction`s, that enable customizing how a new terminal is created at runtime. The following four properties were added:
* `profile`
* `commandline`
* `tabTitle`
* `startingDirectory`

`profile` can be used with either a GUID or the name of a profile, and the action will launch that profile instead of the default.

`commandline`, `tabTitle`, and `startingDirectory` can all be used to override the profile's values of those settings. This will be more useful for #607.

With this PR, you can make bindings like the following:

```json

{ "keys": ["ctrl+a"], "command": { "action": "splitPane", "split": "vertical" } },
{ "keys": ["ctrl+b"], "command": { "action": "splitPane", "split": "vertical", "profile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}" } },
{ "keys": ["ctrl+c"], "command": { "action": "splitPane", "split": "vertical", "profile": "profile1" } },
{ "keys": ["ctrl+d"], "command": { "action": "splitPane", "split": "vertical", "profile": "profile2" } },
{ "keys": ["ctrl+e"], "command": { "action": "splitPane", "split": "horizontal", "commandline": "foo.exe" } },
{ "keys": ["ctrl+f"], "command": { "action": "splitPane", "split": "horizontal", "profile": "profile1", "commandline": "foo.exe" } },
{ "keys": ["ctrl+g"], "command": { "action": "newTab" } },
{ "keys": ["ctrl+h"], "command": { "action": "newTab", "startingDirectory": "c:\\foo" } },
{ "keys": ["ctrl+i"], "command": { "action": "newTab", "profile": "profile2", "startingDirectory": "c:\\foo" } },
{ "keys": ["ctrl+j"], "command": { "action": "newTab", "tabTitle": "bar" } },
{ "keys": ["ctrl+k"], "command": { "action": "newTab", "profile": "profile2", "tabTitle": "bar" } },
{ "keys": ["ctrl+l"], "command": { "action": "newTab", "profile": "profile1", "tabTitle": "bar", "startingDirectory": "c:\\foo", "commandline":"foo.exe" } }
```

## References

This is a lot of work that was largely started in pursuit of #607. We want people to be able to override these properties straight from the commandline. While they may not make as much sense as keybindings like this, they'll make more sense as commandline arguments.

## PR Checklist
* [x] Closes #998
* [x] I work here
* [x] Tests added/passed
* [x] Requires documentation to be updated

## Validation Steps Performed
There are tests 🎉

Manually added some bindings, they opened the correct profiles in panes/tabs
@ghost
Copy link

ghost commented Jan 14, 2020

🎉This issue was addressed in #3825, which has now been successfully released as Windows Terminal Preview v0.8.10091.0.:tada:

Handy links:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants