Skip to content
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

Starting Windows Terminal with Win+X should lead to a different default profile #13284

Open
csdvrx opened this issue Jun 12, 2022 · 2 comments
Open
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Milestone

Comments

@csdvrx
Copy link

csdvrx commented Jun 12, 2022

Windows Terminal version

1.13.11432.0

Windows build number

10.0.22000.708

Other Software

No response

Steps to reproduce

  1. Setup WSL as your default profile in windows terminal (or azure...)
  2. Press Win+X then I or A to start the windows terminal in normal or administrative mode
  3. This will open the default profile which can be WSL2 if you use Linux a lot, while you would not expect a linux profile from a default Win+X keyboard sequence

Expected Behavior

Win+X then I or A should start a Windows native prompt, as people starting Windows Terminal with the Win+X sequence are more likely to need PowerShell (or the command prompt) than Linux or Azure etc.

Consequently, there should be at least 3, more likely 4 different "default" profiles corresponding to the different context in which WT can be started:

  • the regular default profile for when WT is started from the start menu or the taskbar (regular use): whatever the user has currently setup as a default
  • the WinX default profile for when WT is started from the key sequence Win+X: typically for maintenance, like by following step-by-step instruction guides
  • the QuakeMode default profile for when WT is started from Alt+`: typically to quickly run commands as an overlay (therefore without tabs, titlebars etc)
  • (the 4th one would separate Win+X I and Win+X A)

Making these defaults configurable could allow say sticking to the command prompt for one of the Win+X sequences while preferring PowerShell for the other.

This means a typical user could start WT in 4 different ways:

  • click on the icon to start WSL2
  • press Win+X I to start a normal command prompt
  • press Win+X A to start an elevated PowerShell
  • press Alt-` to start git bash

Actual Behavior

Win+X then I or A starts the default profile, with no further distinction.

Likewise, Alt+` brings the current WT windows with any tab currently opened

@csdvrx csdvrx added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jun 12, 2022
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 12, 2022
@zadjii-msft
Copy link
Member

Hmm. There's a lot to unpack here.

  • I'm pretty confident that there's no way for us to identify that we were launched via the Win+X menu. They're basically just calling wt.exe, if they can tell that we're installed.
  • THEORETICALLY, you could change those shortcuts yourself. There is a way to manually change the entries in the win+X menu, and you could totally change that to wt -p <whatever>.
  • There is already a request for "global summon a window with a specific profile" (somewhere between Quake mode: Add support for reserved tabs #10279 and Summon window and switch to profile #12135). Then you could always bind something like, Win+Shift+X to summon --profile "Command Prompt", or whatever.
  • There's also Add per-window-name global settings #9992, for "change the defaultProfile of the _quake window

@zadjii-msft zadjii-msft added Issue-Question For questions or discussion Product-Terminal The new Windows Terminal. and removed Issue-Bug It either shouldn't be doing this or needs an investigation. labels Jun 13, 2022
@zadjii-msft zadjii-msft added this to the Backlog milestone Aug 9, 2023
@zadjii-msft zadjii-msft added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. and removed Issue-Question For questions or discussion Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 9, 2023
@zadjii-msft
Copy link
Member

Okay, we discussed more as a team today.

The way things are today, this is probably unsolvable without a lot of platform support.

We discussed a theoretical solution:

  • First, we need to fix the COM elevation thing, so that running an elevated CLI exe can possibly activate a defterm application. (which is tracked in.... some thread that needs finding)
  • Then, we could just revert the platform-side changes that made the Win+X menu point at wt.exe. Point it back at your choice of cmd.exe or powershell!
  • Then, the shortcuts will store properties in the .lnk again, like they used to.
  • Then, some work that's linked to Epic: Default-by-default fall-out, long-term plans, and community feedback #13392 should let us get some settings from the lnk. So that will feel like different profiles, or we could explicitly make different profiles for different .lnks for defterm.

But that's probably years out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

2 participants