terminal
terminal copied to clipboard
[MEGATHREAD] Quake Mode & Global Summon
[Original thread: #653] [Spec: #9274, doc] [Project]
See also Quake Mode FAQ
1.9 tasks
- [x] Add support for win in keybindings (PR: #9783)
- this is in
dev/migrie/f/win-in-keybindings
- this is in
- [x] _quake window opens in focus mode, on the top half, and can't be moved or resized (except on bottom) (PR: #9785)
- This is in
dev/migrie/f/653-special-_quake-window
- This is in
- [x]
quakeMode
action activates the_quake
window (or creates one) (PR: #9854)- This is in
dev/migrie/f/653-QUAKE-MODE
- This is in
- [x]
quakeMode
summons the window to the current desktop (PR: #9954)- This is implemented in
dev/migrie/f/quake-toCurrent-desktop
- This is implemented in
- [x]
quakeMode
/globalSummon
hides the window if it's currently active (PR: #9963) - [x]
quakeMode
does the dropdown dance on entrance (PR: #9977)- Started this in a6cd981 but that feels really hacky and bad. See
dev/migrie/f/quake-dropdown
for more progress -
dev/migrie/f/quake-dropdown-2
has the most research notes in it, for future readers.
- Started this in a6cd981 but that feels really hacky and bad. See
- [x] Exempt the
_quake
window from window glomming (PR: #9956) - [x]
quakeMode
summons the window to the current monitor
2.0 tasks
- [x]
globalSummon
to summon a window by name (PR: #9854)- This is in
dev/migrie/f/653-QUAKE-MODE
- This is in
- [x] Basic
globalSummon
action (PR: #9854)- [x] Add support for the
toggleVisibility
property (PR: #9963) - [x] Add support for the
desktop
property to control how window summoning interacts with virtual desktops- This is implemented in
dev/migrie/f/quake-toCurrent-desktop
- This is implemented in
- [ ] Add support for the
monitor
which monitor the window appears on.- [x]
"monitor": "toCurrent"|"any"
for on the current vs where it is (PR #10092) - [x]
"monitor": "toMouse"
for to where the mouse pointer is (PR #10092) - [ ]
"monitor": "onCurrent"
- [x]
- [x] Add support for the
dropdownDuration
property (PR: #9977)
- [x] Add support for the
- [ ] We need a commandline arg to force the window to ignore
initialPosition
and use the current monitor instead. - [x] Add the
minimizeToTray
setting, and implement it without any sort of flyout- [x]
_quake
window is hidden when minimized (PR: #10113) - [x] Add tray icon when quake window is minimized #10179
- [x] Add a list of windows to the right-click flyout on the tray icon
- [x] Add support for the
alwaysShowTrayIcon
setting
- [x]
- [ ] Exiting
_quake
mode should restore the focus mode state, window position that the window had before. - [ ] There should maybe be a default action like:
{ "name": "Promote to quake window", "command": { "action": "renameWindow", "name": "_quake" } }
- [ ] KNOWN ISSUE: If you try to summon the window while task manager is focused, the window will not get activated. Presumably this can happen with other apps as well. UWP OneNote seems affected as well.
- [x] Wrong size on Quake mode with hetero sized screens #10182
- [x] #10805
- [x] Quake Mode has incorrect window size after toggling fullscreen mode #10199
- [x] 1px window border of the quake dropdown terminal "leaks" onto horizontally adjacent monitor: #10201
- [x] Make Quake mode work with a German keyboard layout #10203
- [x] Quake Mode multi monitor setup #10274
- [ ] More...
Backlog
- [ ] Add per-window-name global settings #9992
-
READ: "configure the
_quake
window to have some different set of settings - size, profile, etc."
-
READ: "configure the
- [ ] Allow the tabs to be visible in quake mode / don't force
_quake
into focus mode. This might be best served by #9992 - [ ] Allow other, non-
_quake
windows to be locked to the top half of the display. Probably should be a global setting. Consider #9992 when authoring this. - [ ] Allow windows to be docked to other sides of the display? That might be insane though.
- [ ] Enable
globalSummon
/quakeMode
to work even when there isn't a running Terminal #9996 - [ ]
globalSummon
a new tab in explorer CWD #10202 - [x] Quake mode hot-key stops working after a while. Restart of terminal fixes it #10340
- [x] #10660
- [ ] #11162
- [ ] #11174
- [ ] #10534
- [ ] The animation is wonky:
- [ ] #12293: The dropdown animation could be better. It would be better if it animated the whole window frame, but it's gotta look good. #9977 has notes on what I tried and didn't work for me.
- [ ] #12121
- [ ] #10279
- [ ] Also: #13276, for
wt summon
- [ ] Closely related is #12135, for
wt summon --profile
- [ ] Also: #13276, for
- [ ] #10197
- [ ] #10672
- [ ] #10999
- [ ] #11014
- [ ] #11125
- [ ] #12173
- [ ] #12594
- [x] #12894
- [ ] #12944
- [ ] More...
Is there any additional setup needed for the Windows Quake mode shortcut? I thought it was Win + ` - is that the right shortcut command or do I need to do some additional setup for it work especially with multiple monitors.
@vinodj Yes, you'll need to add the keybindings yourself manually. Also note that quakeMode
and globalSummon
are only available in 1.9+, which hasn't shipped yet.
I've been using the following:
{ "keys": "win+`", "command": { "action": "globalSummon", "monitor": "any" } },
{ "keys": "ctrl+shift+`", "command": { "action": "quakeMode" } },
And I've also got the following blob for testing (which shows a bunch more of the available properties):
{ "keys": "ctrl+`", "command": { "action": "quakeMode" } },
{ "keys": "ctrl+1", "command": { "action": "globalSummon" } },
// { "keys": "ctrl+2", "command": { "action": "globalSummon", "desktop": "toCurrent" } },
// { "keys": "ctrl+2", "command": { "action": "globalSummon", "toggleVisibility": false } },
// { "keys": "ctrl+2", "command": { "action": "globalSummon", "dropdownDuration": 2000 } },
// { "keys": "ctrl+2", "command": { "action": "globalSummon", "dropdownDuration": 2000, "name": "_quake" } },
{ "keys": "ctrl+2", "command": { "action": "globalSummon", "monitor": "any" } },
// { "keys": "ctrl+3", "command": { "action": "globalSummon", "desktop": "onCurrent" } },
{ "keys": "ctrl+3", "command": { "action": "globalSummon", "monitor": "toMouse" } },
// { "keys": "ctrl+4", "command": { "action": "globalSummon", "desktop": "any" } },
{ "keys": "ctrl+4", "command": { "action": "globalSummon", "monitor": "toMouse", "dropdownDuration": 500 } },
{ "keys": "ctrl+5", "command": { "action": "globalSummon", "dropdownDuration": 500 } },
I've successfully built and gotten quake mode working from the master branch. Is there currently support for launching it in the default
focus mode? I noted in some of the PRs that it said you could specify that the _quake
window have a specific launchMode
, but I've yet to see HOW to do that. I obviously realize that this is still an extremely alpha feature, but I'm curious to know if this has already been figured out. I love that we've gotten this far, but I'd love to have tabs in my quake window. Thanks!
So, there are plenty of different ways to do this:
- The window that's specifically named
_quake
is special. It's always in focus mode, always on the top half, always drops down, and always hides on minimize. It's specifically summoned with thequakeMode
action. That action will always summon the_quake
window to the current monitor, as well.- Note that the quake window does still have tabs, it's just always in focus mode.
- Any window can be summoned, not just the
_quake
window! - If you want the
_quake
window to summon on whatever monitor it was first created on, you can just create a new action:
{ "keys": "win+`", "command": { "action": "globalSummon", "name": "_quake", "monitor": "any" } }
- If you want the
_quake
window to summon without a dropdown:
{ "keys": "win+`", "command": { "action": "globalSummon", "name": "_quake" } }
- If you want a window that just drops down, but doesn't have the rest of the quake mode baggage, you can always just bind
{ "keys": "win+`", "command": { "action": "globalSummon", "dropdownSpeed": 200 } }
that'll just summon the MRU window, wherever it is. It'll still have tabs, it'll still be wherever you want on the screen. It'll move to the current monitor.
- There's not a good way (in 1.9) of locking a window to the top half of the screen, with tabs. I'd recommend just resizing a window manually.
Is there a way to start Terminal in quake
mode? Tried setting launchMode
without success. Workaround is starting Terminal, press keybinding to start quake, and close launch window
The easiest way IMO is wit the commandline wt -w _quake
(or, on a dev build, wtd -w _quake
). You can use that in the run dialog (win+r), or by making a shortcut with that as the commandline.
You could also add an action like:
{ "name": "Promote to quake window", "command": { "action": "renameWindow", "name": "_quake" } }
which you could use to take the current window and turn it into the quake window.
~~I think as a part of #9992, we'll also let you stick a name
in the globals, to set a name for the window on startup~~ Actually, that would only ever work for the first window, would be redundant info in each window
object, would generally be confusing. We'll want a more clever solution than that.
So, there are plenty of different ways to do this:
The window that's specifically named
_quake
is special. It's always in focus mode, always on the top half, always drops down, and always hides on minimize. It's specifically summoned with thequakeMode
action. That action will always summon the_quake
window to the current monitor, as well.
- Note that the quake window does still have tabs, it's just always in focus mode.
Any window can be summoned, not just the
_quake
window!If you want the
_quake
window to summon on whatever monitor it was first created on, you can just create a new action:{ "keys": "win+`", "command": { "action": "globalSummon", "name": "_quake", "monitor": "any" } }
- If you want the
_quake
window to summon without a dropdown:{ "keys": "win+`", "command": { "action": "globalSummon", "name": "_quake" } }
- If you want a window that just drops down, but doesn't have the rest of the quake mode baggage, you can always just bind
{ "keys": "win+`", "command": { "action": "globalSummon", "dropdownSpeed": 200 } }
that'll just summon the MRU window, wherever it is. It'll still have tabs, it'll still be wherever you want on the screen. It'll move to the current monitor.
- There's not a good way (in 1.9) of locking a window to the top half of the screen, with tabs. I'd recommend just resizing a window manually.
This is good, but the behavior I'm looking for is to just make the _quake
window not focused. I want all the other window properties (docked to top of monitor, taking up the top half, only resizable vertically, etc.), I would just like the see the tabs list in the quake window. Perhaps I'm barking up the wrong tree and ought to wait for something more to come out of #9992 to apply settings to window names persistently.
I'm having trouble with the quoted solution because I don't know if I can apply initial size and position to a window upon executing an action. I want some Terminal windows to act like they do by default, a moveable and resizable terminal that I can drag around my screen, but I ALSO want a persistent quake-like terminal. Just with a tab list. I've created the following action, but without editing my global settings I can't achieve the desired "top half of screen, docked to top, only resizable vertically" effect. As you've said at the end of your post, there's not a good way of locking a window to the top of the screen.
{
"keys": "win+`",
"command": {
"action": "globalSummon",
"dropdownSpeed": 200,
"window": "quakey",
"toggleVisibility": true,
"monitor": "toMouse",
"desktop": "toCurrent"
}
}
The ideal scenario would be the linked issue that would allow me to apply some custom settings to all windows named _quake
.
want all the other window properties (docked to top of monitor, taking up the top half, only resizable vertically, etc.), I would just like the see the tabs list in the quake window.
Fair point. That's not gonna be in 1.9, but we can work on that. I'll throw some bullet points in the list.
I understand after some digging that we don't see tabs or a titlebar or anything because of "focused mode". If there was a way to toggle off focus mode in the _quake
window, my personal use case for the quakeMode
action would be satisfied. I've tried the action to toggle focus mode, but I'm willing to bet it's just getting overriden again by the _quake
window properties before i can see any visible change. Again, #9992 seems to be sort of where that might be headed with globally assignable per-window-id properties.
FYI, We've changed quake mode to only force you into focus mode on launch - you can now leave focus mode (with the command palette or a keybinding) just fine. See #10150
Sorry if I'm asking it in the wrong thread. Just tried out quake mode. I typed in exit
into powershell which opened and now I can't summon the terminal again with Win+`
. Is this intentional?
Yep. You need to actually have a terminal instance running to be able to use a globalSummon
/quakeMode
action.
Yep. You need to actually have a terminal instance running to be able to use a
globalSummon
/quakeMode
action.
I see, makes sense. I actually tried this, but it didn't work.
I relaunched Windows Terminal Preview, then closed it with X again, and Win+`
was still not working. I now retried it and this time I pressed Win+`
while the terminal window was still open. After that I can actually close the Terminal with the X in the corner and Win+`
keeps working.
I guess I just have to remember to NOT exit
the shell from quake mode. Would be nice if there's a way to launch a new Terminal instance if none is running, but I guess something needs to handle the global hook :/
Would be nice if there's a way to launch a new Terminal instance if none is running, but I guess something needs to handle the global hook :/
Yea, this is something we've theorized for a while. I've updated #9996 to put some thoughts in there and track that. I'll add more later.
Is it possible / planned to configure the default profile for quake windows? I want it to have a different style compared to the normal terminal windows. In particular, it should be:
- acrylic,
- top most or minimize if it loses focus,
- shorter (~20 rows, instead of 30)
while the normal terminal windows should behave like the default config (solid, normal window, 30 rows)
This would be achievable if quake mode had its own startup section in the settings.
@Dimension4 Yea, we're tracking that over in #9992. That's gonna quickly become "I'd like _quake
to behave differently". There's also just the option right now to rebind win+` to globalSummon
instead of to quakeMode
, and we'll just use whatever the default settings are.
I noticed a super minor thing when trying this out today: the 1px window border of the quake dropdown terminal "leaks" onto my horizontally adjacent monitor:
Obviously this is hard to show on a screenshot, but IRL because of the bezel separating my screens I can clearly see the 1px gray border on the leftmost pixel row of my right monitor.
Are there any plans to allow multiple or at least selectable shells for the quake window? I'd like to be able to have one shortcut to open WSL and a different one for powershell (and probably a 3rd for msys).
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
Should the quake mode work with a German keyboard layout out of the box? The ` key has a special handling on the German keyboard, because it is used to handle accents and is not processed immediately. So ` + a produces à. If you want to type a `, you have to press the ` + [space].
Are there any plans to allow multiple or at least selectable shells for the quake window? I'd like to be able to have one shortcut to open WSL and a different one for powershell (and probably a 3rd for msys).
That's tricky, but I think you'll be able to do that with #9992. What you'd end up with is different window names for each profile you want a specific hotkey for. The defaultProfile
for those windows would be set to whatever profile you want. Then, you'd bind globalSummon
actions, with the name
set to each of those window names.
It's maybe a verbose set of settings, but it would work.
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.
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.
Should the quake mode work with a German keyboard layout out of the box? The
key has a special handling on the German keyboard, because it is used to handle accents and is not processed immediately. So
+ a produces à. If you want to type a, you have to press the
+ [space].
You know, @lhecker was just messaging me about this. We should figure that out.
Maybe I found another bug.
If I restart my PC, I can't open Quake-Mode with my shortcut. I have to open WT first and close to use my shortcuts.
@meydominic That's already been reported and acknowledged in this very thread: https://github.com/microsoft/terminal/issues/8888#issuecomment-848051583
Since there's been a ton of questions on the topic in the last two days, I've added a Quake mode FAQ. If it's not covered there, then feel free to ask follow-ups in this thread.
I'm not sure if I'm doing something wrong or not or missing any settings. But, quakemode animation isn't very smooth when setting dropdownDuration
value to anything higher than 200ms. If I set it to 1000ms, the window frame just pops up, then has a delayed drawing effect afterwards:
Maintainer note: I'm marking this half of the comment as off topic - I'd really rather focus on _our_ implementation of quake mode in this thread
For the time being, I ended up using Windows-Terminal-Quake to handle animating quake mode better (and also provide traditional non-acrylic blur transparency and ability to remove borders). I wasn't able to disable borders or use traditional non-acrylic blur transparency natively in Terminal Preview yet. If there is a way to address any of these items, please let me know what I'm missing.
Anyway, thank you so much for all your hard work guys!
FYI, the dropdown animation is not something I'm totally happy with. Case in point, from OP:
- [ ] The dropdown animation could be better. It would be better if it animated the whole window frame, but it's gotta look good. #9977 has notes on what I tried and didn't work for me.
It's a great thing that this is an iterative project - we can start with something okay, and iterate to make it great. If anyone wants to play around with it and help fix it, we'd happily review that PR.
Off Topic: vintage style whole window opacity is tracked in #603, with more notes in https://github.com/microsoft/terminal/wiki/Frequently-Asked-Questions-(FAQ)#can-i-have-non-blurred-transparency
With a Finnish keyboard layout, the key between Esc and Tab inserts §
(U+00A7) unshifted or ½
(U+00BD) shifted. "win+§"
works in settings.json, provided that the file is encoded in UTF-8 rather than Windows-1252. Filed https://github.com/microsoft/terminal/issues/10330.
(Spy++ on Notepad shows WM_KEYDOWN nVirtKey:VK_OEM_5 cRepeat:1 ScanCode:29 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
. VkKeyScanW(0x00A7)
returns 220 = 0xDC = VK_OEM_5
. VkKeyScanW(0x00BD)
returns 476 = 0x1DC.)
User reports that the hotkey to trigger Quake mode is also affecting foreground application (for example Edge) in https://github.com/microsoft/terminal/issues/10450#issuecomment-863890274 . Is this something we can (and should) handle?
User reports that the hotkey to trigger Quake mode is also affecting foreground application (for example Edge) in #10450 (comment) . Is this something we can (and should) handle?
The Alt key is pretty standard on Windows to open/focus and navigate menubars with the keyboard. Even if it was possible to intercept that, I would ask you don't do it. The menubar-navigation functiinality of fhe Alt-Key is pretty important imo, and this "issue" (no -issue IMO) isn't new.
Is it possible to have the Quake window come up from the bottom of the screen?