Open terminal on the active screen from windows explorer #17723

Open
opened 2026-01-31 05:51:26 +00:00 by claunia · 2 comments
Owner

Originally created by @eMaurits on GitHub (Jun 15, 2022).

Description of the new feature/enhancement

When I right click in a folder and click 'Open in Terminal' it always opens on the main screen while I have the explorer opened on the second or third screen.
Please open the terminal or on the latest screen it was open, or on the screen from where I open the terminal.

Proposed technical implementation details (optional)

Originally created by @eMaurits on GitHub (Jun 15, 2022). # Description of the new feature/enhancement When I right click in a folder and click 'Open in Terminal' it always opens on the main screen while I have the explorer opened on the second or third screen. Please open the terminal or on the latest screen it was open, or on the screen from where I open the terminal. # Proposed technical implementation details (optional)
Author
Owner

@zadjii-msft commented on GitHub (Jun 15, 2022):

Huh. That's not a bad idea. How we communicate where the parent window is might be tricky. I don't know if we can pass in a parent window to ShellExecute, I'd imagine we can. Presumably then CW_USEDEFAULT would respect that. Then, we'd just need a way for --initialPostion (or whatever, #4620) to specify "don't use initialPostion, use CW_USEDEFAULT"

@zadjii-msft commented on GitHub (Jun 15, 2022): Huh. That's not a bad idea. How we communicate where the parent window is might be tricky. I don't know if we can pass in a parent window to ShellExecute, I'd imagine we can. Presumably then CW_USEDEFAULT would respect that. Then, we'd just need a way for `--initialPostion` (or whatever, #4620) to specify "don't use `initialPostion`, use `CW_USEDEFAULT`"
Author
Owner

@smallscript commented on GitHub (Jan 12, 2023):

First, I applaud and support this idea.

Having multiple monitors makes this annoying to not have it.

I frequently use keystrokes to open a terminal from some app (like VsCode) whose window is the keyboard input focus.

The behavior I desire/expect is that the terminal will open up on the same monitor and position itself reasonably in relation to the focused window application from which the launch request was triggered.

As it is now, I can only solve this by moving around the windows setting of my main monitor, or define an AUTO-HOT-KEYS trick to reposition the terminal after it is located ⟨once it is in the foreground⟩.

💯 🤔 🙏

@smallscript commented on GitHub (Jan 12, 2023): First, I applaud and support this idea. Having multiple monitors makes this annoying to not have it. I frequently use keystrokes to open a terminal from some app (like VsCode) whose window is the keyboard input focus. The behavior I desire/expect is that the terminal will open up on the same monitor and position itself reasonably in relation to the focused window application from which the launch request was triggered. As it is now, I can only solve this by moving around the windows setting of my main monitor, or define an AUTO-HOT-KEYS trick to reposition the terminal after it is located ⟨once it is in the foreground⟩. 💯 🤔 🙏
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17723