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

Open
opened 2026-01-31 05:50:33 +00:00 by claunia · 2 comments
Owner

Originally created by @csdvrx on GitHub (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

Originally created by @csdvrx on GitHub (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
claunia added the Issue-FeatureNeeds-Tag-FixProduct-Terminal labels 2026-01-31 05:50:34 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jun 13, 2022):

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 #10279 and #12135). Then you could always bind something like, Win+Shift+X to summon --profile "Command Prompt", or whatever.
  • There's also #9992, for "change the defaultProfile of the _quake window
@zadjii-msft commented on GitHub (Jun 13, 2022): 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 #10279 and #12135). Then you could always bind something like, <kbd>Win+Shift+X</kbd> to `summon --profile "Command Prompt"`, or whatever. * There's also #9992, for "change the `defaultProfile` of the `_quake` window
Author
Owner

@zadjii-msft commented on GitHub (Aug 9, 2023):

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 #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.

@zadjii-msft commented on GitHub (Aug 9, 2023): 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 #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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17696