Closed NOFUNEVER closed 3 years ago
So you mean if you have three monitors (for example), you could hit a different hotkey to cause the terminal to slide down quake console style from whichever monitor you choose?
So you mean if you have three monitors (for example), you could hit a different hotkey to cause the terminal to slide down quake console style from whichever monitor you choose?
Exactly, exactly. I know it seems a bit outlandish/unnecessary/gimmicky for what's meant to be a heavily used mainstream terminal but I promise you the productivity is what really makes hot key drop downs shine.
Ideally each monitor is has it's own terminal that can be kept open simultaneously with the others. In nix using 3 instances of Tilda I have it set up so that f1 drops,closes,or select if open but not active the left monitor. F2 does my center screen and f3 does my right. I can use these hot key's to jump between these three terminals if they are open already as well. The end result makes moving between terminals and other background applications a workflow dream. It's also looks pretty dang cool if I do say so myself.
Guake another alternative I like is limited to only one window/instance at a time and it simply drops down on whatever monitor the mouse currently resides in at the time the hot key is pressed. This is also a very neat feature however not what I'm looking for. I wouldn't object to a choice in behavior but lines of code dont grow on trees so made to choose i'd prefer the tilda design.
We really are spoiled terminal wise on the nix side of things and that's what makes Microsoft endeavor to build a new more advanced feature rich terminal so exciting. It really feels like Microsoft is fighting for the time devs and future devs(student here) spend in their operating system and if you pair'd WSL2 with a drop down terminal I know for a fact i'd spend a lot less time booting back and forth between Mint and 10.
Quake mode would be a requirement for me to switch from ConEmu. However I'd much prefer for it to always open the same instance regardless of which monitor/virtual desktop is currently in focus.
Personally I use win+tilde to open ConEmu, but obviously the shortcut should be configurable.
Yes, one instance dropping down, it should drop down on the monitor where our mouse cursor is, and should focus, but it shouldn't show up when you're doing Alt + Tab, so it's feels like it's kinda baked into OS. Like guake.
@cyberhck are you sure it should be where the mouse is, and not where the currently focused window is?
@Jaykul Guake's default behavior is such that the hot key activates the terminal in what ever monitor the mouse currently resides as Cyberhck described. It also has the option to assign it a specific monitor if so desired. It's limited only in that only one instance can run at at time, something windows Terminal has no issue with. If Windows Terminal could be set up the way guake is with the choice between static or follow behavior all it would need is independent settings per instance to match the functionality of both guake(follow or static) and tilda(multiple instances).
Yes, we could have 3 way configuration, one on one specific monitor, one on whatever window is focused, and one where mouse is present, (also it's quite important to have an option to hide from list of application (alt + tab) if this mode is enabled, because I'd imagine users won't want to see that while switching between IDE and browser)
:)
@Jakul, the reason I say where the mouse is present is because when you are browsing through something, mouse is always likely to be in front of your eyes, and if you're using short keys, it's really easy to switch your eyes rather than having to move your mouse all the way.
+1
Please don't reply to threads with a "+1" without providing useful additional feedback. Github has a perfectly good +1 that doesn't ping everyone on the thread's inbox right here:
So you mean if you have three monitors (for example), you could hit a different hotkey to cause the terminal to slide down quake console style from whichever monitor you choose?
The default behaviour on multi monitor for Guake is wherever the mouse is is where the terminal drops down.
You can however set it to drop down to whatever monitor you want via the settings if you don't want this behaviour.
Things I need with this are ability to disable animation and hiding the window completely (from taskbar, alt+tab, win+tab etc.)
Additional option to never show taskbar button would be desired by me too but might be out of scope for this issue
I love the proposal, and it is the only thing that would keep from using it daily (once released). I love using the ctrl+` in ConEmu and don't even use VSCode integrated terminal because of it. However, I'm not sure if I care much about the key binding per monitor idea though.
Also, Would this proposal include starting an instance of the terminal if none were running, similar to other linux terms like xfce terminal dropdown with application shortcut? I wouldn't mind if it were Win+` as a system shortcut, similar to Win+\<num> for taskbar shortcuts.
That would be doable with shortcut existing somewhere with global hotkey bound to it and that shortcut using CLI to call toggle if some instance is already running. Making it systemwide hotkey seems like a bad idea imo
I would consider developing on windows more (currently 95% done on Linux) if I had a terminal that could drop down like guake.
I mainly use cmder/conemu on windows as well and this is also the main reason I'm not switching yet, especially since I'm using two monitors and (usually) 3 desktops, without a global way to just call down the terminal I essentially have 6 places where the actual window could be, sounds silly, but it's annoying.
Also, many of you mention using a keyboard shortcut for this but you all should consider mapping it on a dedicated mouse button as well, and if possible, gesture. Thank me later.
Glad to see other people are excited by the idea of a configurable drop down terminal. It's clear people have very distinct preferences on how these drop downs behave by default but believe most everyone's preference becomes possible so long as
Then it doesn't matter what you like its within the realm of configurable possibilities.
I personally use a combo of quake and tilda so that I have one terminal bound to each screen and one that follows the mouse.
@NOFUNEVER you have most of what people are asking for right, but @cyberhck and @zakius identified a couple other features that might be important:
It sounds like there is still discussion if this should have multiple instances, like tilda (which I've never used and can't comment on), or single instance, like Guake. Am I missing anything else? If not, we should resolve that question and move towards writing a spec.
(@zakius , you also mentioned a desire to disable dropdown animation. Reason? I don't see anything wrong with that, but a justification would help.)
I dislike animations overall as they steal my focus (if something moves you instinctively look at it, back in the days it could save your life). But there are also what I call blocking animations
, ones that you have to wait through before you can take action, preventing you from reading the text or issuing input commands. These are even more disturbing to workflow as you have no other choice than wait, some of them were designed to mark slow execution, but on fast machines they slow you down.
The best approach would be being able to choose animation time with 0 disabling it completely
we don't want animation like mac which is too slow, but guake finishes it's animation in less than a 100ms, I think, so it's snappy, maybe the delay can be a configuration as well, 0 for no animation. Guake animation seems "just right", it's very fast, yet you can see where it's coming from or where it's going.
Adding configuration would be awesome, as someone who doesn't like animation can disable it, or turn it into a slow animation like mac, I'd just do a 80ms or 120ms.
Ahh how I wish ConEmu was a solution for me, it doesn't work for everyone, it's built on top of Hotkey, and anything on top of hot key is detected as trojan (false alarm).
A lot of people are using terminal for work, and their work don't allow them to install something which is detected as a trojan. (same as Qonsole) https://github.com/joedf/Qonsole/issues/9
Another important thing to consider when implementing this is that the drop-down should appear on the currently active virtual desktop. I use virtual desktops heavily. When I first started using ConEmu, I found that the drop-down terminal would always move me back to desktop 1 and then show the drop-down. I eventually found the settings to get it working as expected in ConEmu, and it is critical that Windows Terminal behave the same way.
Yeah, that should have been obvious actually :D imagine pressing hot key and terminal appearing on the first one when you're on other workspace.
So until our overlords add this to the terminal, I've concocted a simple piece of C# that fixes this for me in the mean time: https://github.com/flyingpie/windows-terminal-quake.
It does Quake-style drop down using CTRL+~ and CTRL+Q, which is totally changeable of course. Currently does fullscreen drop and comes down on the screen + workspace where the mouse is.
Should anyone be drawn, I'm open to suggestions and/or PRs.
@flyingpie That's a pretty neat piece of code you've got there. Looks like most of it would work in c++ as well, so that's good to know.
I just want to re-iterate that while no one on the team is going to have the cycles to do this for 1.0, we'd pretty happily review a contribution from the community. Ideally someone in the community would be able to compile the suggestions and comments from this thread into the Spec Template and submit a PR for that spec. Once that spec is approved, we'd happily review a PR with the code change needed. Looks to me like @flyingpie has really got 90% of the basics down, it'd mostly be polishing the edge cases.
I have a similar usecase. I don't use Quake style, but I do really like the always open terminal.
My ConEmu setup does the following that wt.exe seems to lack so far (in rough order of importance):
All of those are roughly blockers for me switching to wt.exe from ConEmu.
Additionally:
These are all different features which should have their own specs IMO. I'm willing to drive some of this spec process. @zadjii-msft Do you know of any of these bullet points that either have specs already, won't be accomplished for some reason, etc?
*** Tricky?
So you've listed a number of separate issues, lemme see if I can link them all:
Out of those, #1043, #653, #2189 are all marked "Help-Wanted" 😉
I mentioned 4. before, and to make sure that Terminal doesn't appear on Alt+Tab nor Win+Tab when window is hidden
multiple instances means multiple windows that may but don't have to be spread across multiple screens or virtual desktops I assume, but that would make handling global hotkeys much more complex or even impossible (I think conemu disables multi instance when enabling quake mode)
For 11/"multiple instances means multiple windows", I specifically mean what the OP described here: https://github.com/microsoft/terminal/issues/653#issuecomment-491389892
I don't particularly care about that, but it's a separate related issue. I guess they want multiple global hotkeys to open/activate/focus multiple instances in the same way that I want one hotkey for item # 3 on my list.
@zakius
I mentioned 4. before, and to make sure that Terminal doesn't appear on Alt+Tab nor Win+Tab when window is hidden
multiple instances means multiple windows that may but don't have to be spread across multiple screens or virtual desktops I assume, but that would make handling global hotkeys much more complex or even impossible (I think conemu disables multi instance when enabling quake mode)
Multiple instances disabled is what happens on ConEmu when quake dropdown is used. It's near impossible to handle that behaviour in a logical manner you must utilize your tabs or use a terminal multiplexer if you want something like multiple instances WITH quake dropdown.
EDIT: You could possibly work in something where the first terminal window opened is the master and this is the window that is always called down when using the Quake hotkey.
Could be tricky to work that in with tab support - which perhaps is why no other terminal that I know of supports that behaviour. There is also some edge case to consider in that scenario like what happens if you close your main master window and there is a secondary window still open - would the hotkey continue ignoring this secondary terminal window etc.
For ConEmu when Quake is enabled and you try to open ConEmu again (Say from the desktop shortcut) it won't open a new window, instead it will just bring to focus the existing running terminal.
You could possibly work in something where the first terminal window opened is the master and this is the window that is always called down when using the Quake hotkey.
there's also the possibility of allowing to run single instance per physical screen per virtual desktop and this way main hotkey would always bring up the instance on your current active VD and screen, but that's pretty complicated, I think disabling multiple instances is reasonable
I think multiple instances can be ignored if the tabs keep being improved on and the quake-style window can be called from anywhere. At least for now.
there's also the possibility of allowing to run single instance per physical screen per virtual desktop and this way main hotkey would always bring up the instance on your current active VD and screen, but that's pretty complicated, I think disabling multiple instances is reasonable
I wouldn't ignore multiple instances entirely - sometimes it is very handy to have open a terminal on one screen that streams logs or shows system load while working within another terminal on na adjacent screen.
I have previously been using Ubuntu desktop for the last few years (just went back to Windows since WSL v2) and since Guake and the Ubuntu terminal are very similar in terms of responsiveness, UI design / themes etc I often had the default Ubuntu terminal open on my vertical screen watching logs and system load.
That is obviously the easy way around the issue if multiple instances with dropdown is disabled - Use a different terminal. Problem is most terminals on Windows are complete garbage (Hence this project ofc).
the extra instances were with multiple monitors in mind when I suggested it. One per monitor, each with its own hot key. I use a portrait landscape portrait set up at home and while running mint have guake running in the center but it doesn't offer the extra instances tilda has so I use it on the exterior portrait monitors.
On Mon, Sep 16, 2019 at 2:00 PM nofunatall notifications@github.com wrote:
there's also the possibility of allowing to run single instance per physical screen per virtual desktop and this way main hotkey would always bring up the instance on your current active VD and screen, but that's pretty complicated, I think disabling multiple instances is reasonable
I wouldn't ignore multiple instances entirely - sometimes it is very handy to have open a terminal on one screen that streams logs or shows system load while working within another terminal on na adjacent screen.
I have previously been using Ubuntu desktop for the last few years (just went back to Windows since WSL v2) and since Guake and the Ubuntu terminal are very similar in terms of responsiveness, UI design / themes etc I often had the default Ubuntu terminal open on my vertical screen watching logs and system load.
That is obviously the easy way around the issue if multiple instances with dropdown is disabled - Use a different terminal. Problem is most terminals on Windows are complete garbage (Hence this project ofc).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/terminal/issues/653?email_source=notifications&email_token=ACAH5BIA5ZPETCBZK77LMVLQJ7XYVA5CNFSM4HL735C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD62QC3Q#issuecomment-531956078, or mute the thread https://github.com/notifications/unsubscribe-auth/ACAH5BM722EZEB5LQBXGW6TQJ7XYVANCNFSM4HL735CQ .
Guys, we clearly have two separate issues here. Could we edit this one to just be about the "Quake style" (global/single terminal) hotkey?
Then a second issue, that would be blocked by this one, to enable assigning a dedicated "Quake style" hotkey to a different displays.
The first one seems to be more popular and desired. I'd love to see the second one too (cool idea @NOFUNEVER never thought of such feature, seems useful), but it would be nice if we could clear up the topic a bit.
The OP's issue is actually more of the second, despite the name of this issue. Regardless, I think having a hotkey open a single terminal is largely blocked by #2080. We can't really have a hotkey open a single terminal until we can enforce a single terminal.
https://github.com/microsoft/terminal/issues/653#issuecomment-520419611
This is the best breakdown I think.
@rlabrecque Yes, I know that original issue was related to more fancier solution, but looking at the comments most people expressed a desire for "quake"-style only, much less people were interested in custom hotkeys for any display.
That's why I proposed converting this issue into a quake-style related and extract the followup feature request to a separate issue where we'll be able to track it too.
It seems to me this needs to be broken down into multiple issues for each of the various features, starting with the fundamental hotkey-to-toggle-visibility feature. That can be done without any of the other features, right?
With multiple issues, it would be much easier to see what the demand was for each particular twist on the recipe and prioritize development. It does seem like the minimum viable feature would scratch a lot of people's itches.
Is that not what comment https://github.com/microsoft/terminal/issues/653#issuecomment-520419611 is describing?
For anyone waiting for this to switch from conemu (like myself), etc. You can use autohotkey and a pinned taskbar item as a workaround.
autohotkey script:
^`::Send #5
This will map ctrl+` to winkey+5, change that to your needs.
the tool provided by flyingpie is much better: doesn't require pinning and hides taskbar button completely, tbh I'm using it with other app (since Terminal misses few other things too)
Taking the AutoHotKey solution a bit further:
#SC29::ToggleTerminal()
ShowAndPositionTerminal()
{
WinShow ahk_class CASCADIA_HOSTING_WINDOW_CLASS
WinActivate ahk_class CASCADIA_HOSTING_WINDOW_CLASS
WinMove, ahk_class CASCADIA_HOSTING_WINDOW_CLASS,, -5, -10, A_ScreenWidth + 10, A_ScreenHeight * 0.7,
}
ToggleTerminal()
{
WinMatcher := "ahk_class CASCADIA_HOSTING_WINDOW_CLASS"
DetectHiddenWindows, On
if WinExist(WinMatcher)
; Window Exists
{
DetectHiddenWindows, Off
; Check if its hidden
if !WinExist(WinMatcher) || !WinActive(WinMatcher)
{
ShowAndPositionTerminal()
}
else if WinExist(WinMatcher)
{
; Script sees it without detecting hidden windows, so..
WinHide ahk_class CASCADIA_HOSTING_WINDOW_CLASS
Send !{Esc}
}
}
else
{
Run "c:\Users\kim\AppData\Local\Microsoft\WindowsApps\wt.exe"
Sleep, 1000
ShowAndPositionTerminal()
}
}
This script binds win+½ (on Danish keyboard, the top left button below escape) to a function that brings a running terminal instance into focus, or starts a new instance if non is running, and resizes and positions it "correctly". If terminal is already in focus it hides the window (so it doesn't show up in alt+tab).
I updated @kimbirkelund solution a bit, so to fix the window size error in case you don't have the taskbar docked at the bottom as same as I do.
You can find the code at my gist here, or copy it directly from below:
; How much height of screen size the terminal window takes.
VRatio := 0.8
; The path to the Windows Terminal exe file.
WtPath = "%LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe"
#SC29::ToggleTerminal()
ShowAndPositionTerminal()
{
ScreenX := GetScreenLeft()
ScreenY := GetScreenTop()
ScreenWidth := GetScreenWidth()
ScreenHeight := GetScreenHeight()
global VRatio
WinShow ahk_class CASCADIA_HOSTING_WINDOW_CLASS
WinActivate ahk_class CASCADIA_HOSTING_WINDOW_CLASS
WinMove, ahk_class CASCADIA_HOSTING_WINDOW_CLASS,, ScreenX-5, ScreenY-10, ScreenWidth+10, ScreenHeight * VRatio,
}
ToggleTerminal()
{
WinMatcher := "ahk_class CASCADIA_HOSTING_WINDOW_CLASS"
DetectHiddenWindows, On
if WinExist(WinMatcher)
; Window Exists
{
DetectHiddenWindows, Off
; Check if its hidden
if !WinExist(WinMatcher) || !WinActive(WinMatcher)
{
ShowAndPositionTerminal()
}
else if WinExist(WinMatcher)
{
; Script sees it without detecting hidden windows, so..
WinHide ahk_class CASCADIA_HOSTING_WINDOW_CLASS
Send !{Esc}
}
}
else
{
global WtPath
Run %WtPath%
Sleep, 1000
ShowAndPositionTerminal()
}
}
; Gets the edge that the taskbar is docked to. Returns:
; "top"
; "right"
; "bottom"
; "left"
GetTaskbarEdge() {
WinGetPos,TX,TY,TW,TH,ahk_class Shell_TrayWnd,,,
if (TW = A_ScreenWidth) { ; Vertical Taskbar
if (TY = 0) {
return "top"
} else {
return "bottom"
}
} else { ; Horizontal Taskbar
if (TX = 0) {
return "left"
} else {
return "right"
}
}
}
GetScreenTop() {
WinGetPos,TX,TY,TW,TH,ahk_class Shell_TrayWnd,,,
TaskbarEdge := GetTaskbarEdge()
if (TaskbarEdge = "top") {
return TH
} else {
return 0
}
}
GetScreenLeft() {
WinGetPos,TX,TY,TW,TH,ahk_class Shell_TrayWnd,,,
TaskbarEdge := GetTaskbarEdge()
if (TaskbarEdge = "left") {
return TW
} else {
return 0
}
}
GetScreenWidth() {
WinGetPos,TX,TY,TW,TH,ahk_class Shell_TrayWnd,,,
TaskbarEdge := GetTaskbarEdge()
if (TaskbarEdge = "top" or TaskbarEdge = "bottom") {
return A_ScreenWidth
} else {
return A_ScreenWidth - TW
}
}
GetScreenHeight() {
WinGetPos,TX,TY,TW,TH,ahk_class Shell_TrayWnd,,,
TaskbarEdge := GetTaskbarEdge()
if (TaskbarEdge = "top" or TaskbarEdge = "bottom") {
return A_ScreenHeight - TH
} else {
return A_ScreenHeight
}
}
I don't want to continue to take this feature request off track but I wanted to share the changes I made to the work @wizcas and @kimbirkelund have already done. Never really used AHK before so it's rather hackish but in short I added a menu and a settings file so you can change the following:
All this without recompiling the file or opening up the JSON file and editing it manually. It saves the non profile.json settings (e.g. terminal size) in its own settings.ini file in the same dir. Happy to accept changes to it if anyone wants to contribute. I will also at some point add a theme creator here as it was a bit of a chore converting over a Monokai theme I am currently using (in my gists if anyone wants to suss it out). Here's a small preview of Settings Menu:
EDIT: Updated screenshot
You can get the code here: https://gist.github.com/alenbasic/004c5abeb4cc0e0b31b7681371d48898
One of the linked duplicate issues mentioned including tmux control mode support, something that is currently only supported by iTerm on Mac OS. It is an incredibly powerful piece of functionality, but to my knowledge, all attempts to implement it in other terminals died a silent death of unmaintained forks. It would be awesome to have it outside of Mac OS.
I went ahead and started a project, pretty much because of this feature. https://github.com/dotjosh/WinTermPlus
@dotjosh That looks great! Is there any reason why you implemented that as a standalone tool and not a PR? How much effort would it be to merge it?
@dotjosh That looks great! Is there any reason why you implemented that as a standalone tool and not a PR? How much effort would it be to merge it?
I'm strong in C#/WPF and I was able to get it done quickly. I'd be willing to help port it if we are happy with the behavior.
Honestly I think that looks super cool. I'd definitely be happy to review that PR.
It might be a little tricky to port the taskbar tray bits to the more UWP-like model we have (you'll probably need to muck with the package.appxmanifest), this tutorial looked good though. It would also probably make more sense to put the settings for the size to open the window at within profiles.json
, and have the binding defined in there as well (even if it doesn't actually do anything in the TerminalApp, since I presume the binding would need to be registered with the OS itself. I'm sure there's a way to do it in C++, though I don't know what it is 😄
Just quoting something I've said before:
I just want to re-iterate that while no one on the team is going to have the cycles to do this for 1.0, we'd pretty happily review a contribution from the community. Ideally someone in the community would be able to compile the suggestions and comments from this thread into the Spec Template and submit a PR for that spec. Once that spec is approved, we'd happily review a PR with the code change needed. Looks to me like
@flyingpie@dotjosh has really got 90% of the basics down, it'd mostly be polishing the edge cases.
Honestly we don't really need everything in the spec template filled out, I'd just really like to make sure that whatever contribution we accept has thought out the edge cases here, and clearly defines the behavior for those cases. Namely:
I think it depends on what Terminal instance is exactly. If Terminal is not running, then nothing should happen. I don't think there should be a service or something hooking that. If there are no shells left in Terminal, it should still be running, waiting for a new shell to open. Quitting Terminal would need to be more explicit.
I think the general assumption is this mode would only allow one terminal instance. Launching the executable a second time would merely focus the terminal, possibly launching a new default shell in it? (Much like UWP apps function. Open Settings, then focus something else, then open Settings again, only one instance.)
I don't see why not if both of those are supported currently. 👍 The hotkey would function roughly the same as minimizing/restoring from minimized in both of those cases.
The petty thing I miss most when I pop into Windows is having a separate hot key terminal for each of my three monitors. The closest i've ever been to believing in god was when I realized that was obtainable and if you could make that happen in Windows I just might have to kiss you.