Quake mode: Add support for reserved tabs #14044

Open
opened 2026-01-31 03:59:18 +00:00 by claunia · 19 comments
Owner

Originally created by @deoradh on GitHub (May 30, 2021).

Description of the new feature/enhancement

The current quake mode implementation entails a window with a well-known name. This window gets specially handled with regard to summoning: it gets docked and focus mode is turned on. It is otherwise a normal window capable of hosting multiple tabs.

There are existing requests filed for supporting multiple quake mode windows, each with a different profile running. That seems unnecessary given the ability for an existing terminal window to host multiple profiles already. What is lacking is the ability to specify which tab to bring active on summon.

Proposed technical implementation details (optional)

Allow the ability to define reserved tabs by name:

"windows": [
  {
    "name": "_quake",
    "tabs": [
      { "profile": "<guid or name .. not sure which would be better>", "name": "my PS tab" },
      { "profile": "...", "name": "my scratchpad tab" },
      { "profile": "...", "name": "my wolfram tab 1" },
      { "profile": "...", "name": "my wolfram tab 2" },
      { "profile": "...", "name": "org mode" },
      { "profile": "...", "name": "dashboard" }
    ]
  }
]

or, alternatively, add "window" and "tab" names to the existing profile schema, binding them exclusively:

{
    "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "hidden": true,
    "name": "PowerShell",
    "window": "_quake",
    "tab": "my PS tab"
}

Then add an argument to wt.exe that allows specification of the specific tab name to activate (or, if the alternative approach is taken, a profile which has a window and tab name defined). If it is not already live, it will be activated. In this way, hot keys can be defined to summon specific tabs.

On exit or close of any of the named tabs, the tab will remain open, waiting to restart the command in question (immediately, if currently active).

Additional tabs created in the window will follow after the named tabs.

Originally created by @deoradh on GitHub (May 30, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement The current quake mode implementation entails a window with a well-known name. This window gets specially handled with regard to summoning: it gets docked and focus mode is turned on. It is otherwise a normal window capable of hosting multiple tabs. There are existing requests filed for supporting multiple quake mode windows, each with a different profile running. That seems unnecessary given the ability for an existing terminal window to host multiple profiles already. What is lacking is the ability to specify *which* tab to bring active on summon. # Proposed technical implementation details (optional) Allow the ability to define reserved tabs by name: ``` "windows": [ { "name": "_quake", "tabs": [ { "profile": "<guid or name .. not sure which would be better>", "name": "my PS tab" }, { "profile": "...", "name": "my scratchpad tab" }, { "profile": "...", "name": "my wolfram tab 1" }, { "profile": "...", "name": "my wolfram tab 2" }, { "profile": "...", "name": "org mode" }, { "profile": "...", "name": "dashboard" } ] } ] ``` or, alternatively, add "window" and "tab" names to the existing profile schema, binding them exclusively: ``` { "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "hidden": true, "name": "PowerShell", "window": "_quake", "tab": "my PS tab" } ``` Then add an argument to wt.exe that allows specification of the specific tab name to activate (or, if the alternative approach is taken, a profile which has a window and tab name defined). If it is not already live, it will be activated. In this way, hot keys can be defined to summon specific tabs. On exit or close of any of the named tabs, the tab will remain open, waiting to restart the command in question (immediately, if currently active). Additional tabs created in the window will follow after the named tabs.
claunia added the Area-SettingsIssue-TaskProduct-TerminalArea-Windowing labels 2026-01-31 03:59:18 +00:00
Author
Owner

@deoradh commented on GitHub (May 30, 2021):

Potentially related to https://github.com/microsoft/terminal/issues/766, https://github.com/microsoft/terminal/issues/9992

@deoradh commented on GitHub (May 30, 2021): Potentially related to https://github.com/microsoft/terminal/issues/766, https://github.com/microsoft/terminal/issues/9992
Author
Owner

@dag03tsc commented on GitHub (May 31, 2021):

LGTM.

The first option with guid names seems more flexible but I would replace the tabs object with an startupActions string to enable further launch customization, and maybe add a few more properties.

"windows": [
   {
     "name": "_quake",
     "startupActions": "",
     "alwaysOnTop": true,
   }
 ]

Sadly, that'd made this a duplicate of #9992, and this should be closed 'cause #9992 seems to be a more uniform and flexible approach.

@dag03tsc commented on GitHub (May 31, 2021): LGTM. The first option with guid names seems more flexible but I would replace the `tabs` object with an `startupActions` string to enable further launch customization, and maybe add a few more properties. "windows": [ { "name": "_quake", "startupActions": "", "alwaysOnTop": true, } ] Sadly, that'd made this a duplicate of #9992, and this should be closed 'cause #9992 seems to be a more uniform and flexible approach.
Author
Owner

@deoradh commented on GitHub (May 31, 2021):

Disagreed: #9992 doesn’t come close to the core request for this, which is the ability to summon the windows and switch to a tab with a fixed name. That “and” is critical, as is having a stable identifier for a tab: Doing it by position as initially spawned via a startup action doesn’t work – positions (and titles, as noted in a separate issue) can change, whereas identifiers are constants.

This feature request is orthogonal to your suggestion of having startup actions.

@deoradh commented on GitHub (May 31, 2021): Disagreed: #9992 doesn’t come close to the core request for this, which is the ability to summon the windows *and* switch to a tab with a fixed name. That “and” is critical, as is having a stable identifier for a tab: Doing it by position as initially spawned via a startup action doesn’t work – positions (and titles, as noted in a separate issue) can change, whereas identifiers are constants. This feature request is orthogonal to your suggestion of having startup actions.
Author
Owner

@dag03tsc commented on GitHub (May 31, 2021):

Ok, now I see what you mean.

Maybe there should be an additional tab string property inside the window object but what happens when there're two tabs, each one with an instance of the same profile, and both inside the same window?

It'd require some kind of "discrimination keybinding" and/or "tab switcher" applied N times over the exact same profile. Some kind of circular keybinding like the tab switcher's ctrl+tab but with a custom sequence and applied to tabs that share the same profile or something like that but I'm not really sure of its usefulness.

@dag03tsc commented on GitHub (May 31, 2021): Ok, now I see what you mean. Maybe there should be an additional `tab` string property inside the window object but what happens when there're two tabs, each one with an instance of the same profile, and both inside the same window? It'd require some kind of "discrimination keybinding" and/or "tab switcher" applied N times over the exact same profile. Some kind of circular keybinding like the tab switcher's `ctrl+tab` but with a custom sequence and applied to tabs that share the same profile or something like that but I'm not really sure of its usefulness.
Author
Owner

@deoradh commented on GitHub (May 31, 2021):

Uniqueness of identifiers is a general presumption about identifiers 😊

This is why I wouldn’t key it off of things like “title”, which is absolutely intended to change. Similarly, I wouldn’t base it on which profile was attached to the particular tab, since there are easy example of needing, say, multiple PS windows. Though you could simply resolve the ambiguity by spinning up a new profile with a slightly different launch command.

Defining things window-wise feels easier to think about, but defining things profile-wise is simpler to implement (don’t need to add new entities to the settings model, just a pair of new properties).

If defined profile-wise, the presence of these two properties would be sufficient to block traditional instantiation, so we wouldn’t have the issue of two instances of the same tab: WT would explicitly take over and manage the lifecycle of such tabs as I suggest earlier.

@deoradh commented on GitHub (May 31, 2021): Uniqueness of identifiers is a general presumption about identifiers 😊 This is why I wouldn’t key it off of things like “title”, which is absolutely intended to change. Similarly, I wouldn’t base it on which profile was attached to the particular tab, since there are easy example of needing, say, multiple PS windows. Though you could simply resolve the ambiguity by spinning up a new profile with a slightly different launch command. Defining things window-wise feels easier to think about, but defining things profile-wise is simpler to implement (don’t need to add new entities to the settings model, just a pair of new properties). If defined profile-wise, the presence of these two properties would be sufficient to block traditional instantiation, so we wouldn’t have the issue of two instances of the same tab: WT would explicitly take over and manage the lifecycle of such tabs as I suggest earlier.
Author
Owner

@dag03tsc commented on GitHub (May 31, 2021):

... but what happens when there're two instances of the same tab in the same window?

I apologize. I've committed a mistake. I meant two tabs, each one with an instance of the same profile, and both inside the same window.

I'm not really sure I got it right. Do you mean something like the ctrl+alt+f* of some Linux distros? Some predefined launch keybindings targeting some predefined set of windows?

@dag03tsc commented on GitHub (May 31, 2021): > ... but what happens when there're two instances of the same tab in the same window? I apologize. I've committed a mistake. I meant two tabs, each one with an instance of the same profile, and both inside the same window. I'm not really sure I got it right. Do you mean something like the `ctrl+alt+f*` of some Linux distros? Some predefined launch keybindings targeting some predefined set of windows?
Author
Owner

@deoradh commented on GitHub (May 31, 2021):

Uniqueness of identifiers means those tabs would be distinguishable. It would be a syntactic error in the profile to permit collisions.

@deoradh commented on GitHub (May 31, 2021): Uniqueness of identifiers means those tabs would be distinguishable. It would be a syntactic error in the profile to permit collisions.
Author
Owner

@dag03tsc commented on GitHub (Jun 1, 2021):

Uniqueness of identifiers is a general presumption about identifiers

Strictly speaking, that's not true.
It's true that some UUIDs may seem unique but it's all about deterministic algorithms with seeds.
I'm not really sure about Microsoft GUIDs but for UUIDs, seeds can be categorized as:

  • Date & MAC based: v1 and v2.
  • Pseudo-Random based: v4.
  • Namespace based: v3 and v5.

You'll clearly see that each one is strictly deterministic, even the Pseudo-Random one, therefore the uniqueness holds if, and only if the seed, or set of seeds, is unique itself; the UUID uniqueness is directly inherited from its seeds uniqueness.

Uniqueness of identifiers means those tabs would be distinguishable.

How'd you prevent collisions while, at the same time, enable a way to know a tab's GUID prior the actual tab's creation?
You'd need to know it before its creation to be able to use it as a CLI parameter, property setting or keybinding.

It would be a syntactic error in the profile to permit collisions.

I'm pretty sure we all agree that a profile is just a pattern of initialization for any tab's pane, therefore it cannot be linked to a single tab or pane. While a pane must always reference one, and only one profile, a profile can be referenced from N panes without restriction; it just make no sense talking about tab collisions within a profile context, 'cause profiles apply to panes, not tabs.

@dag03tsc commented on GitHub (Jun 1, 2021): > Uniqueness of identifiers is a general presumption about identifiers Strictly speaking, that's not true. It's true that some UUIDs may seem unique but it's all about deterministic algorithms with seeds. I'm not really sure about Microsoft GUIDs but for UUIDs, seeds can be categorized as: - Date & MAC based: v1 and v2. - Pseudo-Random based: v4. - Namespace based: v3 and v5. You'll clearly see that each one is strictly deterministic, even the ***Pseudo***-Random one, therefore the uniqueness holds if, and only if the seed, or set of seeds, is unique itself; the UUID uniqueness is directly inherited from its seeds uniqueness. > Uniqueness of identifiers means those tabs would be distinguishable. How'd you prevent collisions while, at the same time, enable a way to know a tab's GUID prior the actual tab's creation? You'd need to know it before its creation to be able to use it as a CLI parameter, property setting or keybinding. > It would be a syntactic error in the profile to permit collisions. I'm pretty sure we all agree that a profile is just a pattern of initialization for any tab's pane, therefore it cannot be linked to a single tab or pane. While a pane must always reference one, and only one profile, a profile can be referenced from N panes without restriction; it just make no sense talking about tab collisions within a profile context, 'cause profiles apply to panes, not tabs.
Author
Owner

@deoradh commented on GitHub (Jun 1, 2021):

You're not presenting any particular argument against this. This is not a difficult or even novel concept in programming and, honestly, it comes off at grasping for straw men.


Keith J. Farmer

@deoradh commented on GitHub (Jun 1, 2021): You're not presenting any particular argument against this. This is not a difficult or even novel concept in programming and, honestly, it comes off at grasping for straw men. — Keith J. Farmer
Author
Owner

@deoradh commented on GitHub (Jun 1, 2021):

If anything, d, you're demonstrating that you didn't read the suggestion: it is (again) to provide the very names to tabs that would be used in summoning. This is entirely configured by the user, and UUID creation algorithms are irrelevant.


Keith J. Farmer

@deoradh commented on GitHub (Jun 1, 2021): If anything, d, you're demonstrating that you didn't read the suggestion: it is (again) to provide the very names to tabs that would be used in summoning. This is entirely configured by the user, and UUID creation algorithms are irrelevant. — Keith J. Farmer
Author
Owner

@dag03tsc commented on GitHub (Jun 1, 2021):

I read your suggestion and I fully understood it, but I'm not sure I've explained myself right.
Please, don´t get me wrong, I just try to be constructive and to debate, not to argue, so I apologize if I offended you somehow.

What you call tab, is actually a collection of panes, and the name of a pane is, in fact, the name of the profile loaded inside it, as well as many other inherited properties like background, tab color, GUID, etc.
When you click over (or focus) a pane, the tab just reflects the properties of the focused pane.

Due to its focus inheritance nature, conceptually, I guess there's no such thing like a tab ID, despite its position, 'cause it's just a simple group of panes created for the sole purpose of easing the navigation, and the properties of each of these pseudo-groups called tabs relays entirely on its currently focused pane.

I see that you'd like to have some kind of unique ID for each tab. You called it name and I called it GUID; let's call it UID (Unique ID).
Maybe a few more properties too. Even a completely new entity definition inside the model like #9992 proposes, but for tabs.
But that's the main reason I called this /dup #9992 , 'cause @zadjii-msft asked the community for possible additional properties and this could be one of them.

If you reformulate this suggestion, it mainly asks for adding the next properties inside the window entity that #9992 proposes:

"tabs": {
  "name": string;
  "index": number;
  "panes": {
    "index": number;
    "profile": string;
    "size": number;
    "split": string;
    "splitMode": string;
  }[];
}[];
"defaultTab": string;

As you see, I added a few more interesting properties and enabled managing multiple panes too, but it does not make this a new issue. I'd still consider it as a comment for enhancement to #9992. In fact, that's exactly what I'm going to do right now.

@dag03tsc commented on GitHub (Jun 1, 2021): I read your suggestion and I fully understood it, but I'm not sure I've explained myself right. Please, don´t get me wrong, I just try to be constructive and to debate, not to argue, so I apologize if I offended you somehow. What you call tab, is actually a collection of panes, and the name of a pane is, in fact, the name of the profile loaded inside it, as well as many other inherited properties like background, tab color, GUID, etc. When you click over (or focus) a pane, the tab just reflects the properties of the focused pane. Due to its focus inheritance nature, conceptually, I guess there's no such thing like a tab ID, despite its position, 'cause it's just a simple group of panes created for the sole purpose of easing the navigation, and the properties of each of these pseudo-groups called tabs relays entirely on its currently focused pane. I see that you'd like to have some kind of unique ID for each tab. You called it name and I called it GUID; let's call it UID (Unique ID). Maybe a few more properties too. Even a completely new entity definition inside the model like #9992 proposes, but for tabs. But that's the main reason I called this /dup #9992 , 'cause @zadjii-msft asked the community for possible additional properties and this could be one of them. If you reformulate this suggestion, it mainly asks for adding the next properties inside the window entity that #9992 proposes: "tabs": { "name": string; "index": number; "panes": { "index": number; "profile": string; "size": number; "split": string; "splitMode": string; }[]; }[]; "defaultTab": string; As you see, I added a few more interesting properties and enabled managing multiple panes too, but it does not make this a new issue. I'd still consider it as a comment for enhancement to #9992. In fact, that's exactly what I'm going to do right now.
Author
Owner

@deoradh commented on GitHub (Jun 1, 2021):

it has nothing to do with 9992, and I'd appreciate it if you'd stop hijacking other people's suggestions.

@deoradh commented on GitHub (Jun 1, 2021): it has nothing to do with 9992, and I'd appreciate it if you'd stop hijacking other people's suggestions.
Author
Owner

@dag03tsc commented on GitHub (Jun 1, 2021):

I'm so sorry but you clearly misunderstood my intentions 'cause I've never meant to hijack anything from anyone.
My only intention is to collaborate with the community in bringing new features aboard and fixing bugs.

In addition, I always give the credit to whom it belongs, as you can see in the first line of the last comment I've written in 9992.
Obviously, I've linked this suggestion to give it visibility and raise it, not to pull it down or to hijack it in any way, and I'm really sorry if I offended you in any way with that misunderstanding.

I really look for this feature to become available so everyone can benefit from it! 😊 👍

@dag03tsc commented on GitHub (Jun 1, 2021): I'm so sorry but you clearly misunderstood my intentions 'cause I've never meant to hijack anything from anyone. My only intention is to collaborate with the community in bringing new features aboard and fixing bugs. In addition, I always give the credit to whom it belongs, as you can see in the first line of the last comment I've written in 9992. Obviously, I've linked this suggestion to give it visibility and raise it, not to pull it down or to hijack it in any way, and I'm really sorry if I offended you in any way with that misunderstanding. I really look for this feature to become available so everyone can benefit from it! 😊 👍
Author
Owner

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

Okay so this issue sounds to me like two separate requests:

  • "I want a global hotkey that combines a globalSummon and a switchToTab into a singular action/keypress"
  • I want to be able to pin tabs (#5969)

Focusing on just the first half of the request (as discussion on the second is probably best saved for #5969) - I'm not sure there's a simple way to express that. Given the possible scenarios that a user might want for that, IMO, the mentally easiest model is to just press two keybindings. win+`, ctrl+alt+2 is a little bit of keyboard gymnistics, but you could always rebind actions so that it's easier. If you want to get weird, you could bind:

{ "keys": "win+alt+1", "command": { "action": "globalSummon" } },
{ "keys": "win+alt+2", "command": { "action": "globalSummon" } },
{ "keys": "win+alt+3", "command": { "action": "globalSummon" } },
{ "keys": "win+alt+4", "command": { "action": "globalSummon" } },
//...

(to bind all of win+alt+N to "summon the window"),

Then, do something like win+alt+2, ctrl+alt+2 to not have to move that many fingers.

@zadjii-msft commented on GitHub (Jul 6, 2021): Okay so this issue sounds to me like two separate requests: * "I want a global hotkey that combines a `globalSummon` and a `switchToTab` into a singular action/keypress" * I want to be able to pin tabs (#5969) Focusing on just the first half of the request (as discussion on the second is probably best saved for #5969) - I'm not sure there's a simple way to express that. Given the possible scenarios that a user might want for that, IMO, the mentally easiest model is to just _press two keybindings_. <kbd>win+`</kbd>, <kbd>ctrl+alt+2</kbd> is a little bit of keyboard gymnistics, but you could always rebind actions so that it's easier. If you want to get weird, you could bind: ```jsonc { "keys": "win+alt+1", "command": { "action": "globalSummon" } }, { "keys": "win+alt+2", "command": { "action": "globalSummon" } }, { "keys": "win+alt+3", "command": { "action": "globalSummon" } }, { "keys": "win+alt+4", "command": { "action": "globalSummon" } }, //... ``` (to bind all of win+alt+N to "summon the window"), Then, do something like <kbd>win+alt+2</kbd>, <kbd>ctrl+alt+2</kbd> to not have to move that many fingers.
Author
Owner

@ghost commented on GitHub (Jul 11, 2021):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Jul 11, 2021): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@deoradh commented on GitHub (Jul 11, 2021):

{ "keys": "win+alt+1", "command": { "action": "globalSummon" } },
{ "keys": "win+alt+2", "command": { "action": "globalSummon" } },
{ "keys": "win+alt+3", "command": { "action": "globalSummon" } },
{ "keys": "win+alt+4", "command": { "action": "globalSummon" } },
//...

That looks like a reasonable compromise.

@deoradh commented on GitHub (Jul 11, 2021): > ```js > { "keys": "win+alt+1", "command": { "action": "globalSummon" } }, > { "keys": "win+alt+2", "command": { "action": "globalSummon" } }, > { "keys": "win+alt+3", "command": { "action": "globalSummon" } }, > { "keys": "win+alt+4", "command": { "action": "globalSummon" } }, > //... > ``` That looks like a reasonable compromise.
Author
Owner

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

Awesome, thanks for following up!

@zadjii-msft commented on GitHub (Jul 12, 2021): Awesome, thanks for following up!
Author
Owner

@deoradh commented on GitHub (Jul 12, 2021):

.. wait. the compromise I had in mind still begs having tab switching as part of summon. otherwise it's status quo, and nothing is solved.


Keith J. Farmer


From: Mike Griese @.>
Sent: Monday, July 12, 2021 8:03:50 AM
To: microsoft/terminal @.
>
Cc: Keith J. Farmer @.>; Author @.>
Subject: Re: [microsoft/terminal] Quake mode: Add support for reserved tabs (#10279)

Closed #10279https://github.com/microsoft/terminal/issues/10279.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/terminal/issues/10279#event-5008107808, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACLMBSBKDPSNYEN4UMKITZDTXL75NANCNFSM45YZWV7Q.

@deoradh commented on GitHub (Jul 12, 2021): .. wait. the compromise I had in mind still begs having tab switching as part of summon. otherwise it's status quo, and nothing is solved. — Keith J. Farmer ________________________________ From: Mike Griese ***@***.***> Sent: Monday, July 12, 2021 8:03:50 AM To: microsoft/terminal ***@***.***> Cc: Keith J. Farmer ***@***.***>; Author ***@***.***> Subject: Re: [microsoft/terminal] Quake mode: Add support for reserved tabs (#10279) Closed #10279<https://github.com/microsoft/terminal/issues/10279>. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<https://github.com/microsoft/terminal/issues/10279#event-5008107808>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACLMBSBKDPSNYEN4UMKITZDTXL75NANCNFSM45YZWV7Q>.
Author
Owner

@zadjii-msft commented on GitHub (Jan 11, 2022):

Sorry, this got lost in my mailbox and I'm just thinking of it again. I'm resurrecting this, because it tracks well with another thread I'm about to file.

Proposal:

  • tabIndex: Switch to that tab, if there are that many.
@zadjii-msft commented on GitHub (Jan 11, 2022): Sorry, this got lost in my mailbox and I'm just thinking of it again. I'm resurrecting this, because it tracks well with another thread I'm about to file. Proposal: * `tabIndex`: Switch to that tab, if there are that many.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14044