Allow a command line argument for wt that would accept a monitor designation #20194

Open
opened 2026-01-31 07:06:16 +00:00 by claunia · 2 comments
Owner

Originally created by @badgermole on GitHub (Jul 5, 2023).

Description of the new feature/enhancement

I have not found a way to cause a new invocation of wt to position its window onto the monitor of my choice.

Things I have tried:

  1. Manually drag the wt window to my chosen monitor. Close it and start a new wt instance. Other windows respect the Windows settings (System->Display) 'Remember window locations based on monitor connection'. But the wt window does not appear to honor that.
  2. For 'wt --pos <x,y>', set x and y to various values. This works, but only puts the window on the 'main display' monitor.
    Note that for giggles, I tried negative numbers and this caused the window to appear on the other(not main) display monitor, but always at position <0,0>.

Proposed technical implementation details (optional)

Suggestions for possible implementation:
*) Allow another command line arg, perhaps similar to the Linux '--display'.
*) Allow the current <x,y> args of --pos to include an optional monitor number, such as <1:100,100>
*) Honor, the 'Remember window locations based on monitor connection' setting. BUT, allow --pos to override that.

Originally created by @badgermole on GitHub (Jul 5, 2023). # Description of the new feature/enhancement I have not found a way to cause a new invocation of wt to position its window onto the monitor of my choice. Things I have tried: 1) Manually drag the wt window to my chosen monitor. Close it and start a new wt instance. Other windows respect the Windows settings (System->Display) 'Remember window locations based on monitor connection'. But the wt window does not appear to honor that. 2) For 'wt --pos <x,y>', set x and y to various values. This works, but only puts the window on the 'main display' monitor. Note that for giggles, I tried negative numbers and this caused the window to appear on the other(not main) display monitor, but always at position <0,0>. # Proposed technical implementation details (optional) Suggestions for possible implementation: *) Allow another command line arg, perhaps similar to the Linux '--display'. *) Allow the current <x,y> args of --pos to include an optional monitor number, such as <1:100,100> *) Honor, the 'Remember window locations based on monitor connection' setting. BUT, allow --pos to override that.
claunia added the Help WantedIssue-BugProduct-TerminalArea-Commandline labels 2026-01-31 07:06:17 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jul 12, 2023):

I don't think this needs to be a feature request - this is probably just a bug report 😜 --pos with a negative number absolutely should work! Our psychic debugging guess is that the arg parser we're using is treating --pos -100,-200 as a different option entirely, rather than a value for the --pos arg.

Thanks for finding this!

EDIT: okay it's not that it doesn't accept a negative number, but it does do something weird. I wonder if it's some sort of clipping logic to try and keep the window entirely on the bounds of the display?

@zadjii-msft commented on GitHub (Jul 12, 2023): I don't think this needs to be a feature request - this is probably just a bug report 😜 `--pos` with a negative number absolutely _should_ work! ~Our psychic debugging guess is that the arg parser we're using is treating `--pos -100,-200` as a different option entirely, rather than a value for the `--pos` arg.~ Thanks for finding this! EDIT: okay it's not that it doesn't accept a negative number, but it does do something weird. I wonder if it's some sort of clipping logic to try and keep the window entirely on the bounds of the display?
Author
Owner

@zadjii-msft commented on GitHub (Sep 6, 2023):

Interesting that wt --pos -400,300 seems to snap to the top-left corner of my left display, while "initialPosition": "-400,300" does the right thing. Weird.

@zadjii-msft commented on GitHub (Sep 6, 2023): Interesting that `wt --pos -400,300` seems to snap to the top-left corner of my left display, while `"initialPosition": "-400,300"` does the right thing. Weird.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20194