Command line option to override alwaysOnTop #19894

Open
opened 2026-01-31 06:56:38 +00:00 by claunia · 8 comments
Owner

Originally created by @vefatica on GitHub (May 17, 2023).

Is there a way to override these (maybe even others) when creating a new window?

-w -1 -M and -w -1 -F are limited versions of what I want to do.

I've read a few (old) threads on specifying a settings file on the command line (valid only if creating a new window). That would seem to be the most robust way to override anything and I'm surprised it hasn't been implemented.

Another thought (hardly well thought-out) ... allow (possibly multiple) command line options like
--option (-o) global_option_name value, again only for new windows.

Originally created by @vefatica on GitHub (May 17, 2023). Is there a way to override these (maybe even others) when creating a new window? `-w -1 -M` and `-w -1 -F` are limited versions of what I want to do. I've read a few (old) threads on specifying a settings file on the command line (valid only if creating a new window). That would seem to be the most robust way to override anything and I'm surprised it hasn't been implemented. Another thought (hardly well thought-out) ... allow (possibly multiple) command line options like `--option (-o) global_option_name value`, again only for new windows.
claunia added the Issue-TaskProduct-TerminalArea-Commandline labels 2026-01-31 06:56:39 +00:00
Author
Owner

@DHowett commented on GitHub (May 17, 2023):

You know, I dunno if we've ever given thought to something like --option. That's an interesting thought!

Right now, we have --pos and --size. --pos is measured in pixels from the top left of the primary display and --size is measured in characters (columns x rows).

For example, wt -w -1 --pos 0,0 --size 80,25 will create an 80x25 character window in the top left of the primary display.

FWIW, these are all listed in wt --help.

@DHowett commented on GitHub (May 17, 2023): You know, I dunno if we've ever given thought to something like `--option`. That's an interesting thought! Right now, we have `--pos` and `--size`. `--pos` is measured in pixels from the top left of the primary display and `--size` is measured in characters (columns x rows). For example, `wt -w -1 --pos 0,0 --size 80,25` will create an 80x25 character window in the top left of the primary display. FWIW, these are all listed in `wt --help`.
Author
Owner

@zadjii-msft commented on GitHub (May 17, 2023):

I'm almost POSITIVE I had this in a thread or card or note somewhere. https://github.com/microsoft/terminal/projects/5#card-50760344 specifically mentions:

  • Needs 14 to be able to specify the location of the new window.

And I can't find 14 anywhere....


wait tho

@zadjii-msft commented on GitHub (May 17, 2023): I'm almost POSITIVE I had this in a thread or card or note _somewhere_. https://github.com/microsoft/terminal/projects/5#card-50760344 specifically mentions: > - Needs 14 to be able to specify the location of the new window. And I can't find 14 anywhere.... ---- wait tho * #4620 * #13730 * https://github.com/MicrosoftDocs/terminal/pull/591
Author
Owner

@vefatica commented on GitHub (May 17, 2023):

Thanks, that's great. I have WindowsTerminalPreview: 1.17.10234.0; --pos and --size work but I don't see them in wt --help or on this page.

@vefatica commented on GitHub (May 17, 2023): Thanks, that's great. I have WindowsTerminalPreview: 1.17.10234.0; --pos and --size work but I don't see them in `wt --help` or on [this page](https://learn.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows).
Author
Owner

@zadjii-msft commented on GitHub (May 17, 2023):

Are you sure wt.exe is pointing at 1.17?
image
image

@zadjii-msft commented on GitHub (May 17, 2023): Are you sure `wt.exe` is pointing at 1.17? ![image](https://github.com/microsoft/terminal/assets/18356694/9215063b-cf27-4829-a0b7-0d838a5556a6) ![image](https://github.com/microsoft/terminal/assets/18356694/4b6bd03a-e48e-46dc-9c15-f53f38f028df)
Author
Owner

@vefatica commented on GitHub (May 17, 2023):

Oops! I also have WindowsTerminal: 1.16.10261.0 (both unpackaged) and that's where wt.exe points (via AppPaths). Had I issued wtp --help I would have seen it. And I reckon it doesn't make it to the web page until it appears in a release version.

@vefatica commented on GitHub (May 17, 2023): Oops! I also have WindowsTerminal: 1.16.10261.0 (both unpackaged) and that's where wt.exe points (via AppPaths). Had I issued `wtp --help` I would have seen it. And I reckon it doesn't make it to the web page until it appears in a release version.
Author
Owner

@zadjii-msft commented on GitHub (May 17, 2023):

Wait but the docs with this should be live: 69955b0636/TerminalDocs/command-line-arguments.md

did I blow this away in https://github.com/MicrosoftDocs/terminal/pull/649?

Wait no it got blown away in b6e1ab9117

Huh.

@zadjii-msft commented on GitHub (May 17, 2023): Wait but the docs with this _should_ be live: https://github.com/MicrosoftDocs/terminal/blob/69955b0636de7a47f164019611d23745c6e046c3/TerminalDocs/command-line-arguments.md did I blow this away in https://github.com/MicrosoftDocs/terminal/pull/649? Wait no it got blown away in https://github.com/MicrosoftDocs/terminal/commit/b6e1ab91176f21ec73a09c28e5e5c20cb7a3c362 Huh.
Author
Owner

@vefatica commented on GitHub (May 17, 2023):

I wish I could do the same for alwaysOnTop.

I'm not crazy about devenv's "terminal". I have a lot of room in devenv and could easily tuck a small stay_on_top WT into a corner ... start it as an external tool. You can consider that a request ... alwaysOnTop command line option.

Will that URL (preview's command line options) remain constant from version to version?

@vefatica commented on GitHub (May 17, 2023): I wish I could do the same for alwaysOnTop. I'm not crazy about devenv's "terminal". I have a lot of room in devenv and could easily tuck a small stay_on_top WT into a corner ... start it as an external tool. You can consider that a request ... alwaysOnTop command line option. Will that URL (preview's command line options) remain constant from version to version?
Author
Owner

@zadjii-msft commented on GitHub (May 17, 2023):

Will that URL (preview's command line options) remain constant from version to version

Sure should.

@zadjii-msft commented on GitHub (May 17, 2023): > Will that URL (preview's command line options) remain constant from version to version Sure should.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19894