Skip to content

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

Open

Description

@csdvrx

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

Activity

  1. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jun 12, 2022
  2. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jun 12, 2022
  3. zadjii-msft commented on Jun 13, 2022

    @zadjii-msft
    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
  4. added and removed
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    on Jun 13, 2022
  5. added
    Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.
    and removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Aug 9, 2023
  6. zadjii-msft commented on Aug 9, 2023

    @zadjii-msft
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions