terminal icon indicating copy to clipboard operation
terminal copied to clipboard

initialPosition (and others) should be available as commandline args

Open bruceoberg opened this issue 5 years ago • 12 comments

initial issue description mentions "per-profile", but consider that they could be commandline arguments

Description of the new feature/enhancement

i want to create multiple shortcuts that launch wt at different sizes and screen positions. i'm talking about multiple instances of wt, not multiple tabs within wt.

however, the initialPosition setting is global and cannot be overridden on a per-profile basis. ditto for initialRows, initialCols and launchMode. because these are global settings, any shortcut can only launch wt at one position and size.

i'm looking for parity with CMD here. a shortcut to CMD has a bunch of settings tabs, including screen size and position. i have shortcuts to launch CMD in different places for various reasons. i'd like to use shortcuts to launch wt instead.

Proposed technical implementation details (optional)

allow initialPosition, initialRows, initialCols and launchMode to be specified within a profile in settings.json. if that profile is the main one active at launch time, then use them instead of the globals.

bruceoberg avatar Feb 17 '20 00:02 bruceoberg

I'd prefer to let commandline arguments solve this one, honestly. I don't like the idea of profiles whose settings override application-level settings, because that opens up a pretty big can of worms. To that end, I've renamed this. Please feel free to complain: I want to make sure I'm not shutting down valuable discussion here.

DHowett-MSFT avatar Feb 21 '20 23:02 DHowett-MSFT

command line arguments is a fine solution. i would have no complaints.

bruceoberg avatar Feb 22 '20 04:02 bruceoberg

+1 command line arguments would work for me as well

dpokluda avatar Feb 25 '20 19:02 dpokluda

i think the strongest reason for this is that CMD has it and i depend on the feature. @DHowett-MSFT @cinnamon-msft should i be trying to write this myself and then send a PR? i can't what sort of priority this request has.

bruceoberg avatar Jan 17 '21 04:01 bruceoberg

@bruceoberg cmd has a feature where you can specify the initial position by commandline argument?

As the engineering owner for cmd, I'm surprised to hear that. Do you have any more details?

DHowett avatar Jan 17 '21 05:01 DHowett

Oh, I see. Per-profile. It doesn't really have that: it's per shortcut file or exe, for which the equivalent is a terminal shortcut that spawns wt with arguments. We are not introducing launch settings to profiles, because they don't make sense at that level. Sorry.

DHowett avatar Jan 17 '21 05:01 DHowett

(i got tricked by my own re-titling of your issue. Sorry about that!)

DHowett avatar Jan 17 '21 05:01 DHowett

so i will never be able to create two shortcuts that launch two wt instances in two different positions? i don't need per-profile settings, i just need a command-line option to set the position and size.

bruceoberg avatar Mar 15 '21 22:03 bruceoberg

I don't think anyone ever said that - DHowett just confused himself 😆

We definitely want to add --initialPostition, --initialRows, --initialCols to the commandline arguments available. Then, you could use those in a shortcut to set the position and size of the Terminal.

zadjii-msft avatar Mar 16 '21 09:03 zadjii-msft

Any news on this subject?

How to start a new windows terminal from command line in a specific location and with specific window size?

arkanario avatar Nov 01 '21 14:11 arkanario

Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button? image That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

zadjii-msft avatar Nov 01 '21 14:11 zadjii-msft

Notes from #13307: Make sure there's a sentinel value or flag or something to also allow CW_USEDEFAULT as the position

zadjii-msft avatar Jun 15 '22 14:06 zadjii-msft

:tada:This issue was addressed in #13730, which has now been successfully released as Windows Terminal Preview v1.17.1023.:tada:

Handy links:

ghost avatar Jan 24 '23 18:01 ghost