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

Add centerOnLaunch setting #9036

Merged
7 commits merged into from
Feb 19, 2021
Merged

Add centerOnLaunch setting #9036

7 commits merged into from
Feb 19, 2021

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Feb 4, 2021

This PR is a resurrection of #8414. @Hegunumo has apparently deleted
their account, but the contribution was still valuable. I'm just here to
get it across the finish line.

This PR adds new global setting centerOnLaunch. When set to true,
the Terminal window will be centered on the display it opens on.

So the interactions are like:

  • initialPos: x,y, centered: true, launchMode: default
    center on the monitor that x,y is on

  • initialPos: x,y, centered: true, launchMode: maximized
    maximized on the monitor that x,y is on (centered adds nothing)

  • initialPos: <omitted>, centered: true, launchMode: default
    center on the default monitor

  • initialPos: <omitted>, centered: true, launchMode: focus
    center, focus mode on the default monitor

  • initialPos: <omitted>, centered: true, launchMode: maximized
    maximized on the default monitor (centered adds nothing)

Validation Steps Performed

I've played with it on multiple different monitors, and it seems to work
on all of them.

Closes #8414 (original PR)
Closes #7722

Co-authored-by: Kiminori Kaburagi yukawa_hidenori@icloud.com

@zadjii-msft zadjii-msft mentioned this pull request Feb 4, 2021
6 tasks
Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

A few missing things:

  • update the schema
  • update the docs
  • Settings UI
    • Option 1: Open a follow-up task to add this to SUI (add it to the correct milestone)
    • Option 2: Update it here and now

Remember, AddASetting.md exists to help out a bit. (Note, #8919 is coming in though, so that might make some of this a bit easier.) InitialPosition is not in SUI though, so that'll be a bit annoying. But I guess we could still do some kind of smart behavior for "if launchMode is not maximized, make centerOnLaunch appear"

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 4, 2021
@zadjii-msft zadjii-msft self-assigned this Feb 8, 2021
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 8, 2021
@zadjii-msft
Copy link
Member Author

zadjii-msft commented Feb 8, 2021

@carlos-zamora RE: settings UI

I'm thinking this would make sense to just do all at once with initialPosition. There's not even a task tracking that yet, so I'll make one to deal with both. The interactions with the initialPosition, centerOnLaunch and launchMode are all interesting enough that I feel like this deserves it's own task.


EDIT: see "SUI: Add settings for initalPosition, centerOnLaunch #9075"

@carlos-zamora carlos-zamora removed their assignment Feb 8, 2021
@carlos-zamora carlos-zamora added the Needs-Second It's a PR that needs another sign-off label Feb 8, 2021
@ghost ghost added 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-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. labels Feb 9, 2021
@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Feb 19, 2021
@ghost
Copy link

ghost commented Feb 19, 2021

Hello @DHowett!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit ba8bd00 into main Feb 19, 2021
@ghost ghost deleted the dev/migrie/f/finish-center-on-launch branch February 19, 2021 22:30
@ghost
Copy link

ghost commented Mar 1, 2021

🎉Windows Terminal Preview v1.7.572.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
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 AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Second It's a PR that needs another sign-off Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Have an option to centre the terminal if a certain InitialPosition value is given
4 participants