Repository navigation
Description
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.
Activity
deoradh commentedon May 30, 2021
Potentially related to #766, #9992
dag03tsc commentedon May 31, 2021
LGTM.
The first option with guid names seems more flexible but I would replace the
tabsobject with anstartupActionsstring to enable further launch customization, and maybe add a few more properties.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.
deoradh commentedon May 31, 2021
dag03tsc commentedon May 31, 2021
Ok, now I see what you mean.
Maybe there should be an additional
tabstring 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+tabbut 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.deoradh commentedon May 31, 2021
dag03tsc commentedon May 31, 2021
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?deoradh commentedon May 31, 2021
dag03tsc commentedon Jun 1, 2021
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:
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.
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.
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.
deoradh commentedon Jun 1, 2021
deoradh commentedon Jun 1, 2021
dag03tsc commentedon 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 Mike Griese (@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:
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.
deoradh commentedon Jun 1, 2021
8 remaining items
zadjii-msft commentedon Jul 12, 2021
Awesome, thanks for following up!
deoradh commentedon Jul 12, 2021
zadjii-msft commentedon 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.