globalSummon a new tab in explorer CWD #13934

Open
opened 2026-01-31 03:56:11 +00:00 by claunia · 2 comments
Owner

Originally created by @zadjii-msft on GitHub (May 26, 2021).

Hey,
little question. The quake mode is really nice, but is there a way to automatically open the terminal/quake mode on current focused explorer folder.

For example I have focused an Explorer window in my Downloads directory and then press ctrl+alt+t (my shortcut for quake mode) it should automatically open the console in this directory.

Thanks

Originally posted by @meydominic in https://github.com/microsoft/terminal/issues/8888#issuecomment-848470679


I'm not sure that is possible, sorry 😕 When pressing the global hotkey, we don't get any context about the active window.......

ah shoot. okay. So, maybe we could:

  • get the foreground window,
  • check if it's an explorer.exe window,
  • then use the hack we're already using for the background context menu to get the path of that window.

That might work. We'd still need a setting for "when this globalSummon action is performed, open a new tab with the explorer CWD." That of course leads to "I want to globalSummon in explorer and get a new pane" or "I want to globalSummon in explorer and new a new pane and have that pane running {profile}"

This deserves it's own thread


Summary

A keyboard shortcut to open terminal app in the same path as file explorer window.

Lot of devs who use VS code or similar editors/IDEs are familiar with the shortcut `ctrl + `` to open terminal in the project's path.
Though windows have a right click shortcut for it, the keyboard shortcut is just muscle memory.

from @MG-LSJ in #17192

Originally created by @zadjii-msft on GitHub (May 26, 2021). Hey, little question. The quake mode is really nice, but is there a way to automatically open the terminal/quake mode on current focused explorer folder. For example I have focused an Explorer window in my Downloads directory and then press ctrl+alt+t (my shortcut for quake mode) it should automatically open the console in this directory. Thanks _Originally posted by @meydominic in https://github.com/microsoft/terminal/issues/8888#issuecomment-848470679_ <hr> I'm not sure that is possible, sorry 😕 When pressing the global hotkey, we don't get any context about the active window....... ah shoot. okay. So, maybe we could: * get the foreground window, * check if it's an `explorer.exe` window, * then use the hack we're already using for the background context menu to get the path of that window. That might work. We'd still need a setting for "when this `globalSummon` action is performed, open a new tab with the explorer CWD." That of course leads to "I want to `globalSummon` in explorer and get a new pane" or "I want to `globalSummon` in explorer and new a new pane and have that pane running {profile}" This deserves it's own thread --- ### Summary A keyboard shortcut to open terminal app in the same path as file explorer window. Lot of devs who use VS code or similar editors/IDEs are familiar with the shortcut `ctrl + `` to open terminal in the project's path. Though windows have a right click shortcut for it, the keyboard shortcut is just muscle memory. _from @MG-LSJ in #17192_
claunia added the Issue-FeatureArea-SettingsProduct-Terminal labels 2026-01-31 03:56:12 +00:00
Author
Owner

@SnirBroshi commented on GitHub (Sep 30, 2021):

I'd also like to suggest that since launching powershell (and perhaps other shells) is super slow (measured 3s on my machine), that there'd also be a way to change the CWD of the existing quake tab (maybe by sending the keystrokes of a cd command?).

@SnirBroshi commented on GitHub (Sep 30, 2021): I'd also like to suggest that since launching powershell (and perhaps other shells) is super slow (measured 3s on my machine), that there'd also be a way to change the CWD of the existing quake tab (maybe by sending the keystrokes of a `cd` command?).
Author
Owner

@zadjii-msft commented on GitHub (Mar 29, 2023):

From #15060

Unsure how this would be technically implemented, but I don't imagine that it would be too difficult to get the currently active File Explorer window (if the currently focus window is a File Explorer window) and then get the path, something similar to this: stackoverflow.com/a/20961047

@zadjii-msft commented on GitHub (Mar 29, 2023): From #15060 > Unsure how this would be technically implemented, but I don't imagine that it would be too difficult to get the currently active File Explorer window (if the currently focus window is a File Explorer window) and then get the path, something similar to this: [stackoverflow.com/a/20961047](https://stackoverflow.com/a/20961047)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13934