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

Allow a separate launch mode for when Terminal automatically starts on login #13630

Open
DHowett opened this issue Jul 29, 2022 · 4 comments
Open
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Milestone

Comments

@DHowett
Copy link
Member

DHowett commented Jul 29, 2022

Ported from MSFT-40653626

It would be nice if we could do these two things:

  1. Have a separate launch mode for when Terminal is started on login by our start on login setting.
  2. Once we have that, add support for launching minimized. This would let people specify that on startup, Terminal should launch minimized... but it should launch normally otherwise.
@DHowett DHowett added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Area-User Interface Issues pertaining to the user interface of the Console or Terminal Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. labels Jul 29, 2022
@DHowett DHowett added this to the Backlog milestone Jul 29, 2022
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jul 29, 2022
@zadjii-msft
Copy link
Member

I feel like we've discussed this before on this repo. I bet I linked it to #9992, but I could see this as something separate, tbh.

@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Aug 1, 2022
@Fulya2133

This comment was marked as duplicate.

@zadjii-msft
Copy link
Member

notes:

ExtendedActivationKind Enum

name value description
StartupTask 1020 The app was activated because the app is specified to launch at system startup or user log-in.

And #14425 adds support for activation event args.

I bet we could:

  • Add some enum values to StartOnUserLogin for disabled, normal, minimized, headless
  • Around the time of WindowEmperor::HandleCommandlineArgs, we get the Activation args. If it's for a StartupTask, then goody, we can change the logic based on that property:
    • normal: don't change anything
    • headless: don't open a window, manually enable compatibility.allowHeadless in the emperor (at least till the next settings reload)
    • minimized: replace launchMode with minimized for all the windows we're restoring.............

zadjii-msft added a commit that referenced this issue Apr 6, 2023
This adds a setting (`compatibility.allowHeadless`) to let the Terminal
keep running even when all windows are closed. This lets hotkeys keep
working, because the Emperor thread is still running, just, without any
windows.

I'm really tempted to invoke the magic "closes" word on #9996, but
honestly, we should also add some sort of support for `wt --headless` or
`wt --hidden` or whatever, before we close that. There's also #13630
which seems imminently doable.

Tested manually. I'd post a gif of "close all terminal windows, then
invoke the quakeMode binding and \*presto\*, but that would be an
unnecessarily big gif.

Related to #9996 but not enough to close it if you ask me
@zadjii-msft
Copy link
Member

Copying notes from my whiteboard, because I just need to erase them at this point:


Can we tell if we're started for a startupTask just from the AppExecAlias?

if (startupTask
    && settings.StartOnLogin() == Headless
    ) 
{
  don't make window
  start monarch
}

Admittedly, that was written a solid year ago, so I'm not entirely sure what it means anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants