-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 property #8414
Conversation
New misspellings found, please review:
To accept these changes, run the following commands
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The :check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
|
New misspellings found, please review:
To accept these changes, run the following commands
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The :check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things:
- Please change "centre" to "center". This helps make the en-us locale consistent in our repo 😊
- Concerns about the design
centerOnLaunch
seems to have a conflict withinitialPosition
. Rather than prioritizingcenterOnLaunch
, how about we consolidate them like this:initialPosition: "," | "#," | ",#" | "#,#" | "center"
- I definitely want another team member to sign off on a design though. Especially since I apparently have a bad habit of consolidating settings a bit too zealously haha
Aside from that, the implementation looks solid. Thanks!
int _width = 0; | ||
int _height = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int _width = 0; | |
int _height = 0; | |
int desktopWidth = 0; | |
int desktopHeight = 0; |
We generally use _
to denote that it's a member. So let's remove that to be consistent.
And added desktop
since you introduced appWidth
and appHeight
below. That way there's a better distinction between the two 😉
Alright, team sanity check - are we cool with adding a The only other possible design would be overloading @DHowett and @carlos-zamora are the usual suspects for having strong opinions on this |
I'm a sucker for |
Maybe I was a little strong in the morning - I guess I don't hate it. But if I abstain, then we'll only have two people voting, so we'd need consensus, or more voters. I suppose Yea I like overloading |
The interaction between the two properties Here's the problem:
|
That's a good point. I suppose I thought So |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
I will fix this. |
Hey I just want a quick ACK, I think nearly 2 months ago we discussed offline being cool with adding this as a separate bool setting. We still on board with that? So the interactions are like:
|
This seems right to me! |
Moved to #9036 |
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>
🎉This issue was addressed in #9036, which has now been successfully released as Handy links: |
Summary of the Pull Request
If the users set true to this property, the terminal will appear on the center of the user's display.
References
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed