-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Shortcut to create new window with current profile? Equivalently, clone current tab into new window #14350
Comments
If you did not change
Write function and set alias for it: |
@237dmitry thank you for your answer. Inline comments follow.
Yes, but this requires pressing a different key combination depending on the current profile, to clone it.
I understand this is a Powershell function that runs |
This request lives in the same nexus as #10232, #12985. (those are about a tab with different NewTerminalArgs, but the same goes for making windows).
We basically need a reconciled version of those for That would effectively deprecate |
aside: I wonder if you could get away with |
@zadjii-msft Definitely! What you describe is exactly what I need, it combines two actions to clone the current tab into a new window. However, I haven't been successful yet, plus the Terminal just crashes sometimes, which seems like a bug in its own right. Here are more details: The following works to move the current tab into a new window [I'm using {
"command":
{
"action": "multipleActions",
"actions":
[
{
"action": "moveTab",
"window": "new"
}
]
},
"keys": "ctrl+shift+f12"
}, But this causes the terminal to crash: {
"command":
{
"action": "multipleActions",
"actions":
[
{
"action": "duplicateTab"
},
{
"action": "moveTab",
"window": "new"
}
]
},
"keys": "ctrl+shift+f12"
}, I'm running Windows Terminal Preview / Version: 1.21.1272.0. Independently of this, I'm testing with the Any next steps I can try / anything that comes to mind? |
@zadjii-msft Hehe, using This looks like a bug, shall I open it as a separate issue? Maybe I'm hitting a similar issue now. |
Definitely! Crashes are absolutely no good, can't have those! |
@zadjii-msft Done! It seems your suggestion is a perfect solution to this issue, so I'm really looking forward to seeing it work. |
Thank you for your work on the Windows Terminal so far, it's pretty awesome!
Description of the new feature/enhancement
Support a shortcut to create a new window with current profile / clone current tab into a new window. That is, if the current tab uses my non-default "Debian" profile, pressing this shortcut will open a new window with a single tab of the "Debian" profile.
This would be super useful to enable a window-based approach, with tiled windows, and it would go really well with the "Focus" launch mode. I see this was rationale behind the requests to add the "New Window" shortcut, Ctrl-Shift-N in the first place [#1051, #3144]
Workarounds
I am describing a few workarounds below:
wt.exe -p $WT_PROFILE_ID
, and I can also alias this for my shell,alias w="wt.exe -p $WT_PROFILE_ID"
, but this only works in Linux, and requires I'm at the shell prompt.It would be awesome to have a single, easy to use keystroke [Alt-F2? :) ] to duplicate the current profile into a new window.
Proposed technical implementation details (optional)
There already is a command to start a new window,
newWindow
.https://learn.microsoft.com/en-us/windows/terminal/customize-settings/actions#window-management-commands
It already accepts
index
andprofile
arguments, but they are absolute. I haven't found a way to refer to the current index/profile.Maybe we could extend
index
and/orprofile
so-1
means "use the index corresponding to the profile of the current tab".I'd love any feedback on this, and I would be happy to contribute to the implementation.
The text was updated successfully, but these errors were encountered: