spawn new tab in quake window with wt -w 0 #14399

Open
opened 2026-01-31 04:09:17 +00:00 by claunia · 10 comments
Owner

Originally created by @NicTanghe on GitHub (Jul 5, 2021).

Windows Terminal version (or Windows build number)

Microsoft Windows NT 10.0.22000.0 (Windows 11 dev preview)

Steps to reproduce

open quake window with windows + `

Run wt -w 0 nt

Expected Behavior

Opens new tab in same window.

Actual Behavior

Opens a new tab in a separate window → follow-up commands use that same window.

PS.

(if this is a dupe, I swear I searched)

Originally created by @NicTanghe on GitHub (Jul 5, 2021). ### Windows Terminal version (or Windows build number) Microsoft Windows NT 10.0.22000.0 (Windows 11 dev preview) ### Steps to reproduce open quake window with windows + ` Run wt -w 0 nt ### Expected Behavior Opens new tab in same window. ### Actual Behavior Opens a new tab in a separate window → follow-up commands use that same window. #### PS. (if this is a dupe, I swear I searched)
claunia added the Issue-TaskNeeds-Tag-FixProduct-TerminalArea-Remoting labels 2026-01-31 04:09:17 +00:00
Author
Owner

@DHowett commented on GitHub (Jul 5, 2021):

So, this one was designed like that on purpose. The quake window isn't terribly discoverable unless you're using it, and we wanted to make it a distinct zone that would never be automatically selected by the shell extension, the windowing behavior setting "use existing window", or -w 0. I wanted to avoid blackholing folks' tabs into an instance they may not want them in at least until we get tab tear-out.

For now, you have to target that window specifically with -w _quake.

Happy to revisit that decision. What do you think we should do?

@DHowett commented on GitHub (Jul 5, 2021): So, this one was designed like that on purpose. The quake window isn't terribly discoverable unless you're using it, and we wanted to make it a distinct zone that would never be automatically selected by the shell extension, the windowing behavior setting "use existing window", or `-w 0`. I wanted to avoid blackholing folks' tabs into an instance they may not want them in _at least until we get tab tear-out_. For now, you have to target that window specifically with `-w _quake`. Happy to revisit that decision. What do you think we should do?
Author
Owner

@zadjii-msft commented on GitHub (Jul 6, 2021):

I might re-purpose this to "Actually use the current window for wt -w 0". Right now we're using the heuristic of "the MRU window" for "the current window", which technically isn't always right. I had a mind to try and use the WT_SESSION variable to reverse engineer this. See the spec.

That could be used to do this right, even for _quake

@zadjii-msft commented on GitHub (Jul 6, 2021): I might re-purpose this to "Actually use the current window for `wt -w 0`". Right now we're using the heuristic of "the MRU window" for "the current window", which technically isn't always right. I had a mind to try and use the `WT_SESSION` variable to reverse engineer this. See [the spec](https://github.com/microsoft/terminal/blob/main/doc/specs/%235000%20-%20Process%20Model%202.0/%234472%20-%20Windows%20Terminal%20Session%20Management.md#running-commands-in-the-current-windowwt---window-0). That could be used to do this right, even for `_quake`
Author
Owner

@NicTanghe commented on GitHub (Jul 6, 2021):

using _quake is a great solution

@NicTanghe commented on GitHub (Jul 6, 2021): using _quake is a great solution
Author
Owner

@matefriedl commented on GitHub (Sep 1, 2021):

Hi, after struggling for a while with WT's quake mode I've finally found this thread. First of all I would like to say that my goal is only to replicate the setup I had with conemu. For me quake mode means the following:

  1. application always runs in single instance mode
  2. customizable global hotkey is available to summon the application
  3. any new launches of the application get attached to old one (create tabs) and the application gets focus (meaning it drops down)
  4. the summon/focus happens from the top of the screen in a drop down fashion

Thanks for the workaround suggestion with wt -w _quake. It allowed me to modify my integrations (open wt from vs code for example) to use quake mode the way like it. In my opinion quake mode would be usable with this as a selectable option.

@matefriedl commented on GitHub (Sep 1, 2021): Hi, after struggling for a while with WT's quake mode I've finally found this thread. First of all I would like to say that my goal is only to replicate the setup I had with conemu. For me quake mode means the following: 1. application always runs in single instance mode 2. customizable global hotkey is available to summon the application 3. any new launches of the application get attached to old one (create tabs) **and the application gets focus** (meaning it drops down) 4. the summon/focus happens from the top of the screen in a drop down fashion Thanks for the workaround suggestion with `wt -w _quake`. It allowed me to modify my integrations (open wt from vs code for example) to use quake mode the way like it. In my opinion quake mode would be usable with this as a selectable option.
Author
Owner

@zadjii-msft commented on GitHub (Sep 1, 2021):

  1. "windowingBehavior": "useExisting"
  2. { "keys": "", "command": { "action": "globalSummon" } }
  3. Two parts to this one:
    • "any new launches of the application get attached to old one": That's useExisting, as above.
    • "meaning it drops down" -> { "keys": "", "command": { "action": "globalSummon", "dropdownDuration": 200 } }
  4. "happens from the top of the screen in a drop down fashion" - Again, that's dropdownDuration

You don't need to use the _quake window to get a hotkey to dropdown-summon the Terminal.

@zadjii-msft commented on GitHub (Sep 1, 2021): 1. [`"windowingBehavior": "useExisting"`](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/startup#new-instance-behavior) 2. [`{ "keys": "", "command": { "action": "globalSummon" } }`](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#global-commands) 3. Two parts to this one: - "any new launches of the application get attached to old one": That's `useExisting`, as above. - "meaning it drops down" -> `{ "keys": "", "command": { "action": "globalSummon", "dropdownDuration": 200 } }` 4. "happens from the top of the screen in a drop down fashion" - Again, that's `dropdownDuration` You don't _need_ to use the \_quake window to get a hotkey to dropdown-summon the Terminal.
Author
Owner

@matefriedl commented on GitHub (Sep 1, 2021):

I already have "windowingBehavior": "useExisting" set, but it ignores the already existing quake style window. It just opens up a normal window. Any further launches get attached to this one. I can only attach to the quake windows if i run with -w _quake.

What I'm trying to say is that useExisting does not care about already open quake instances, and according to @DHowett, this is intentional. I believe there should be an option to have useExisting respect quake windows.

@matefriedl commented on GitHub (Sep 1, 2021): I already have `"windowingBehavior": "useExisting"` set, but it ignores the already existing quake style window. It just opens up a normal window. Any further launches get attached to this one. I can only attach to the quake windows if i run with `-w _quake`. What I'm trying to say is that `useExisting` does not care about already open quake instances, and according to @DHowett, this is intentional. I believe there should be an option to have `useExisting` respect quake windows.
Author
Owner

@zadjii-msft commented on GitHub (Sep 1, 2021):

I believe there should be an option to have useExisting respect quake windows.

Our more long term goal is to just allow non-_quake windows to get some of the special treatments that _quake does, namely, the "snapped to the top half" treatment.

@zadjii-msft commented on GitHub (Sep 1, 2021): > I believe there should be an option to have `useExisting` respect quake windows. Our more long term goal is to just allow non-\_quake windows to get some of the special treatments that \_quake does, namely, the "snapped to the top half" treatment.
Author
Owner

@NicTanghe commented on GitHub (Mar 7, 2025):

check what it was ran from and use 0 or _quake accordingly.

@NicTanghe commented on GitHub (Mar 7, 2025): check what it was ran from and use 0 or _quake accordingly.
Author
Owner

@NicTanghe commented on GitHub (Mar 7, 2025):

oh ok i c that this is actually being worked on so i wil leave this open.

@NicTanghe commented on GitHub (Mar 7, 2025): oh ok i c that this is actually being worked on so i wil leave this open.
Author
Owner

@Knutas commented on GitHub (Mar 14, 2025):

I'd also like the option to allow _quake to work with "windowingBehavior": "useExisting". For instance to glom terminals started by VS.

@Knutas commented on GitHub (Mar 14, 2025): I'd also like the option to allow `_quake` to work with `"windowingBehavior": "useExisting"`. For instance to glom terminals started by VS.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14399