microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.88k stars 8.22k forks source link

Open terminal on the active screen from windows explorer #13307

Open eMaurits opened 2 years ago

eMaurits commented 2 years ago

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)

zadjii-msft commented 2 years ago

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"

smallscript commented 1 year ago

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⟩.

💯 🤔 🙏