-
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 --pos
and --size
cmdline args
#13730
Add --pos
and --size
cmdline args
#13730
Conversation
I have written some commandline parsing tests, but didn't push them as TAEF is erroring out for some reason when running the
It's done this to me in the past - when I was back on Windows 10. Upgrading to Windows 11 fixed it for a bit, then it started erroring again. |
I'm (vaguely) worried about these, even though we have an open feature request for them. They specify what happens to a new WT window, but they don't control windowing semantics. So, if your settings are such that all invocations launch in the same window, you'll never see the impact of these args unless you add In addition, should we consider something more "all-in-one" like xterm's AKA: It's three arguments, should it be one? Or maybe two? We perhaps incorrectly made it three different settings... but we don't need to repeat that mistake. Thoughts? I know I'm just brain-dumping right now. |
What you are suggesting certainly sounds more powerful. Especially if you allow it to change the location of an existing window. You could potentially open yourself up to malicious programs arbitrarily changing the position of your terminal, but I would imagine that's a low risk - it sounds more annoying than anything else. Unless I'm reading it wrong, X's geometry spec seems a bit rigid compared to what terminal currently allows - i.e. you have to provide the complete specification or nothing. Maybe two arguments would be better - a position and a size? e.g. |
I don't think that changing location of an existing window is natural. Are there any applications where this is implemented? |
Adding initialRows and initialCols as a single argument makes more sense to me when used this way. You're typically changing both anyways and if you only enter one of them, the other can just remain default. And now that we have semicolons working better, that can be used as the delimiter to determine which is which (rows first; cols) and yes still need |
@DHowett it's been a couple of weeks since I opened this - have you/the team had any thoughts on what you'd like the command line args to be? |
quick 5pm note:
|
I'd go further and call it Sorry for the delay @ianjoneill! |
sure |
initialPosition
, initialRows
and initialCols
cmdline args--pos
, and --size
cmdline args
I've updated the cmdline args as per your suggestions. |
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.
This is simple and I'm cool with it. I don't love our ProposedSize
implementation, but that's not on you at all. Sheesh, getting data from one end of the app to the other is a bear, innit?
Thanks for doing this & putting up with the delay!
We're now in the slightly weird situation where this is documented, but not merged! https://learn.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows |
paging @PankajBhojwani into the OR |
--pos
, and --size
cmdline args--pos
and --size
cmdline args
Since this has two approvals, merging. @msftbot merge this in 5 minutes EDIT: ok, I'll just add the automerge label then. EDIT2: huh, the bot acknowledged the automerge label then didn't merge it! |
Hello @carlos-zamora! Because this pull request has the 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 (
|
Since #13730 merged, when we parse LaunchPosition we treat the coordinates as `int32_t`. This PR updates the actual `LaunchPosition` struct to also use `int32_t` for consistency. ## Validation Steps Performed Terminal still builds and runs
🎉 Handy links: |
Adds
--pos
, and--size
commandline arguments towt
.Closes #4620