-
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
Add support for the windowingBehavior
setting
#9118
Conversation
…ompile a String[]
…!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
…safely tear it down. It _seems_ like it.
…ndow should be. It just always says 0 for now, but in the future it could actually give us useful info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Just tagged Kayla on one thing because I don't want us to have to revisit the wordsmithing conversation later.
<data name="Globals_WindowingBehavior.Header" xml:space="preserve"> | ||
<value>New windows open in...</value> | ||
</data> | ||
<data name="Globals_WindowingBehavior.HelpText" xml:space="preserve"> | ||
<value>Controls how new terminal instances attach to existing windows.</value> | ||
</data> | ||
<data name="Globals_WindowingBehaviorUseNew.Content" xml:space="preserve"> | ||
<value>a new window</value> | ||
</data> | ||
<data name="Globals_WindowingBehaviorUseAnyExisting.Content" xml:space="preserve"> | ||
<value>the most recently used window</value> | ||
</data> | ||
<data name="Globals_WindowingBehaviorUseExisting.Content" xml:space="preserve"> | ||
<value>the most recently used window on this desktop</value> | ||
</data> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cinnamon-msft please take a look here. Easier to get the wording correct now than have to get it localized and change it later.
minor minor nit: PR body needs updating to reflect current enum names for things |
DO NOT AUTOMERGE |
@@ -232,6 +232,22 @@ | |||
<data name="Globals_LaunchModeMaximized.Content" xml:space="preserve"> | |||
<value>Maximized</value> | |||
</data> | |||
<data name="Globals_WindowingBehavior.Header" xml:space="preserve"> | |||
<value>New windows open in...</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<value>New windows open in...</value> | |
<value>wt.exe window behavior</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmmmm... this will be weird when Def Term is in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cinnamon-msft Yea I concur. Plus I'm just not sure that the users will always think "ah yes, I'm running wt.exe
". Like when running from the start menu - that's also going to behave this way.
I'm fine flipping these back since what's proposed is basically what I had originally - I just want to make sure we're sure, and I'm not so sure about mentioning "wt.exe"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Launch window behavior
?
<value>Controls how new terminal instances attach to existing windows.</value> | ||
</data> | ||
<data name="Globals_WindowingBehaviorUseNew.Content" xml:space="preserve"> | ||
<value>a new window</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<value>a new window</value> | |
<value>Create a new window</value> |
<value>a new window</value> | ||
</data> | ||
<data name="Globals_WindowingBehaviorUseAnyExisting.Content" xml:space="preserve"> | ||
<value>the most recently used window</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<value>the most recently used window</value> | |
<value>Attach to the most recently used window</value> |
<value>the most recently used window</value> | ||
</data> | ||
<data name="Globals_WindowingBehaviorUseExisting.Content" xml:space="preserve"> | ||
<value>the most recently used window on this desktop</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<value>the most recently used window on this desktop</value> | |
<value>Attach to the most recently used window on this desktop</value> |
<comment>This text is a fragment of a sentence that indicates the options below it, in a user interface. It is a header, but it should be read like a sentence that ends with one of {Globals_WindowingBehaviorUseNew.Content}, {Globals_WindowingBehaviorUseAnyExisting.Content}, or {Globals_WindowingBehaviorUseExisting.Content}.</comment> | ||
</data> | ||
<data name="Globals_WindowingBehavior.HelpText" xml:space="preserve"> | ||
<value>Controls how new terminal instances attach to existing windows.</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<value>Controls how new terminal instances attach to existing windows.</value> | |
<value>Controls how new terminal instances launched from wt.exe attach to existing windows.</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a little redundant though, right? Like, all the windows are ones spawned from wt.exe
. Do we really need to specify that?
(I personally love the sentenceized version of it ("new windows open in...")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOVE THIS.
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
I guess I am incredibly bad at reading and got too excited AND AUTOMERGED THE "DO NOT AUTOMERGE" PR. |
Finally implements the `newWindow` action. It does so by `ShellExecute`ing `wt.exe` with commandline args corresponding to the ones that would create the same `NewTerminalArgs`. This works with #8898 and #9118 to allow new windows (even with `windowingBehavior: useExisting`) This is taken from my auto-elevate branch, hence the references to elevation References #5000 References projects/5 References #8898 References #9118 Closes #1051
🎉 Handy links: |
Adds support for the
windowingBehavior
global setting. This settingcontrols how mutiple instances of
wt
behave in the absence of the-w
parameter. This setting has three values:
"useNew"
: (default) Multiplewt
invocations (without the-w
param) always create new windows.
"useAnyExisting"
: When starting a newwt
, we'll instead default toany existing windows.
wt -w -1
will still create new windows."useExisting"
: Similar touseAnyExisting
, but limits towindows on the current desktop.
The IVirtualDesktopManager interface is very limited. Hence why we
have to track the HWNDs manually, and ask if they're on the current
desktop.
Validation Steps Performed
I've been playing with it for a week now.
References #5000
References projects/5
References #8898
Spec'd in #8135
Closes #2227
Closes https://github.com/microsoft/terminal/projects/5#card-51431448
Closes https://github.com/microsoft/terminal/projects/5#card-51431433