flyingpie / windows-terminal-quake Goto Github PK
View Code? Open in Web Editor NEWTurn any app into a Quake-style toggleable app.
Home Page: https://wtq.flyingpie.nl
License: MIT License
Turn any app into a Quake-style toggleable app.
Home Page: https://wtq.flyingpie.nl
License: MIT License
Right now it appears centralized but, if anyone is like me and use the start bar anchored to the right, it will show the terminal below it, which isn't very nice. Instead, if I could adjust it by left aligning it (and then ajust its width) it would be perfect.
Thank you!
Here are the hotkeys listed in windows-terminal-quake.json .
// # HotKeys
// ## Modifiers
// Alt, Control, Shift, Windows
//
// ## Key
// ### Special keys
// Alt, Back, CapsLock, Control, Escape, LControlKey, LShiftKey, LWin, RControlKey, RShiftKey, RWin, Shift, Space, Tab
//
// ### Middle part of the keyboard
// Delete, End, Home, Insert, PageDown, PageUp, PrintScreen
// Down, Left, Right, Up
//
// ### Number keys
// D0 - D9
//
// ### Letters
// A-Z
//
// ### Numpad
// NumPad0 - NumPad9
// Add, Decimal, Divide, Multiply, NumLock, Separator, Subtract
//
// ### Function keys
// F1 - F24
//
// ### Special characters
// OemBackslash, OemCloseBrackets, Oemcomma, OemMinus, OemOpenBrackets,
// OemPeriod, OemPipe, Oemplus, OemQuestion, OemQuotes, OemSemicolon, Oemtilde
But actually, any Key from the Key enum will work!
For example, I use "Oem7", which is the key left of 1 on my french-canadian keyboard layout!
I understand that by definition ToggleAnimationFrameTimeMs
has a lower bound of 15 and defines the lower bound for ToggleDurationMs
(granted I didn't quite catch this at first and trial-and-errored my way around for a while)
However, the terminal window is effectively a normal (albeit transparent and whatever else is configured) window when toggled in this state. Not sure whether worth looking into/fixing whatsoever, considering this is unsupported anyway, but just thought I'd bring it up regardless - please close this if wontfix
:)
That said, comments in the sample windows-terminal-quake.json
might be better expanded about the caveats here, so for example:
// How long the toggle up/down takes in milliseconds. The lowest value possible for this is defined by ToggleAnimationFrameTimeMs below
"ToggleDurationMs": 250,
Thanks for your work, and for the great release! Super glad to see the 1.0 milestone :D
Currently, using the hotkey causes the terminal appear on the monitor where the mouse cursor is. It would be nice to have an option to set an integer that identifies which monitor the terminal should appear on with null
being the current behavior.
The application does not work.
The expected behavior:
Run the app, the app is working and ctrl+` drops the terminal and process windows-terminal-quake.exe
is in the processes.
But after a click on the app, only the terminal is opening and the process windows-terminal-quake.exe
appears only in second in processes, and then it is disappearing.
I tried 0.5, 0.6 and 0.7 versions.
I use Cairo Desktop on top of Windows; it displays a menu bar at the top of the screen, similar to macOS and GNOME. By default, the terminal window's tabs are obscured by it.
It would be personally useful if there was a way to specify a vertical offset to the exposed terminal window, or if WTQ took the desktop's boundaries into consideration when toggling the window's visibility (maximized windows don't obscure Cairo's menu or task bars; i.e., CD sets boundaries correctly, so that info can be relied on).
I would like the key to be set to F12 so it behaves just like in linux, my config is simply
"HotKeys": [
{
"Key": "F12"
}
]
but it didn't work, i have tried other keys in it's place and it seems fine, I think it's only the function keys that are broken
I've added following config file:
C:\Users%USERNAME%\windows-terminal-quake.json
with below content:
{
"AlwaysOnTop": true,
"HideOnFocusLost": false,
"HorizontalScreenCoverage": 80,
"VerticalScreenCoverage": 80,
"StartHidden": true
}
when I start the app, the terminal launches but the quake mode does not work
Workaround:
Remove the config file, start the app and bring the file back. The app loads the config on-the-fly and works as expected
How hard would it be to implement something like this?
https://www.codeproject.com/Articles/5165015/AutoUpdate-A-GitHub-Enabled-autoupdater
I haven't been active with visual studio in quite a while. It looks like a very simple wrapper.
I also wanted to say thanks. This project has helped me feel more at home on windows. I tried the conemu and variants and they were really frustrating with random cutting off of terminal text width and other issues. Windows terminal isn't perfect, but it's a great start.
It would be nice to be able to customize stepDelay
and/or stepCount
(https://github.com/flyingpie/windows-terminal-quake/blob/master/windows-terminal-quake/Toggler.cs#L64-L65). The main motivation would be to lower the delay/increase the count, as that would provide a much smoother animation.
However, I did some research (stack overflow, mdsn) and Task.Delay
probably wouldn't work for a much shorter delay (anything below 15ms would be moot).
If there's any interest, I could look for alternative solutions and probably even draft a PR. Let me know. =D
Should i run this from WIndows Terminal or as a separate process? If i run it from Windows terminal then can I run it in the background somehow or do I need another tab for my regular work?
Hey there, thanks for this software 👍. I find it very useful when I am on Windows. I was wondering if you plan on adding support to allow the application to start on the preferred monitor when it is in AtIndex
mode? I quickly hacked this in here but perhaps there is a better/more elegant way.
Anyway, thank you again - cheers 🍻
Feature Request: I've put windows-terminal-quake to startup directory. So I'd love that it would start Windows Terminal if one is not already running. Not it just fails with a warning popup.
Hey @flyingpie, thanks a lot for creating this. I was so very happy to find this plugin. I'm sure I will be using this all the time like I did in Cmder.
I've downloaded v0.5
(also tried v0.4
) and read the readme, but could not find how it is supposed to open both terminal and this plugin at the same time. I had hoped there would be some setting that allows the plugin to start with terminal automatically.
Option 1:
Option 2;
windows-terminal-quake
executable"C:\Users\(username)\"
windows-terminal-quake.exe
windows-terminal-quake.exe
windows-terminal-quake.exe
again with the window already openI tried looking in the following places for clues how to make it work out of the box:
Thanks again for your great work.
I don't want to remember which version of this companion I have installed. It would be great if hovering your mouse over the Tray icon would show version number. Now it says "Windows Terminal Quake", instead it could show "Windows Terminal Quake v0.11".
Thanks for the nice utility!
Please delete.
Currently when starting windows-terminal-quake
, I immediately get a (almost?) full screen terminal window (even though that doesn't match my settings at all). I'd love to have an option to not show the terminal when windows-terminal-quake
starts so I can put it in my autostart.
Keep getting ArgumentExceptions when running the applciation. Happens both with the settings json next to the application, and in user folder.
Tried multiple versions.
Event Viewer exception details:
Application: windows-terminal-quake.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
at System.IO.FileSystemWatcher..ctor(System.String, System.String)
at WindowsTerminalQuake.Settings+<>c.<.cctor>b__9_0(System.String)
at System.Linq.Enumerable+WhereSelectArrayIterator2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext() at System.Collections.Generic.List
1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable1<System.__Canon>) at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable
1<System.__Canon>)
at WindowsTerminalQuake.Settings..cctor()
Exception Info: System.TypeInitializationException
at WindowsTerminalQuake.Settings.get_Instance()
at WindowsTerminalQuake.Logging.Configure()
at WindowsTerminalQuake.Program.Main(System.String[])
Should be due to invalid paths according to docs
Hello,
Please make this focus feature a settings option.
I use a focus follow mouse AHK script which gives focus to the window under the mouse without actually bringing it in front (meaning keyboard works, but the mouse did not touch the windows).
I often find myself being dragged from a monitor where I have the mouse to the monitor of the terminal when I minimize the terminal by shortcut, or when I close the game bar after pressing Super+G.
I am not able to pinpoint this problem to the quake wrapper. I don't see a lot of consistency immediately when I am closing my ahk scripts and when I exit WTQuake. I am not sure whether this option remains active after that or wether
it's related to the WTQuake feature.
If, you can, and think it's worth it, please create a way to disable this one in the settings file.
Thanks for the app. It make WT livable for the quake style terminal fans, when there aren't a lot of options for windows.
Regards,
Alex
Hello!
Great tool!
But It would be great if the terminal under the tool could be accessible by Alt + Tab shortcut like any other window in the workspace.
By the options in setting for example.
Thank you!)
The button in the top-left of my keyboard enters a ` (backtick) normally and ¬ shifted.
I've tried entering ` as the key to bind to (plus Control) but it doesn't work. ^Q and ^' work (' being OemTilde).
When using multiple monitors, I personally would like an option to keep Terminal visible when clicking on window on another monitor. I'd only want to hide it when clicking outside on the same monitor or pressing the show/hide hotkey.
Currently setting "HideOnFocusLost": false
is not enough to keep the terminal from going behind windows.
As a workaround I have added the keybinding to windows terminal { "command": { "action": "toggleAlwaysOnTop" }, "keys": "ctrl+shift+q" }
. This is a sufficient workaround for me, but I have to remeber to hit that key combo when I first start windows terminal quake.
Can you make it so setting hide on focus lost to false also sets windows terminal quake to be always on top?
When used alongside vscode with the shortcuts
{ "key": "ctrl+`", "command": "workbench.action.terminal.focus"},
{ "key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus"}
The quake terminal is called using ctrl+` instead of the vscode terminal panel despite them being different shortcuts.
TBH I like it, it just isn't expected behaviour.
Could be nice to have it configurable via a json file for:
Hotkeys
Timer for the dropdown
I modified Settings and Logging to
Path.Combine(Path.GetDirectoryName(new Uri(typeof(Settings).Assembly.Location).LocalPath), "windows-terminal-quake.json")
and it was working.
Also, I'm trying to run from a folder in Program Files, and things seem pretty broken, such as it doesn't reload the settings automatically. Probably due to permissions in that folder.
I sometimes get a System.NullReferenceException
when toggling the terminal (full traceback pasted below).
Anecdotally, so far it's only happened when I was fullscreened (e.g., YouTube video), though I can't reproduce reliably.
I'm using v0.11 on Win 10 Pro 19042.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at WindowsTerminalQuake.Toggler.GetBounds(Screen screen, Int32 stepCount, Int32 step)
at WindowsTerminalQuake.Toggler.Toggle(Boolean open, Int32 durationMs)
at WindowsTerminalQuake.Toggler.<>c__DisplayClass3_0.<.ctor>b__2(Object s, HotKeyEventArgs a)
at WindowsTerminalQuake.Native.HotKeyManager.MessageWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
windows-terminal-quake
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Tim/Applications/windows-terminal-quake/windows-terminal-quake.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Runtime.Serialization
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
My current settings under "Hotkey" are:
[
{
"Modifiers": "LWin",
"Key": "OemTilde"
},
{
"Modifiers": "Windows",
"Key": "Z"
},
{
"Modifiers": "Control",
"Key": "OemTilde"
}
]
Using this, control+~ works, but neither win+z or win+~ work.
Version 1.1.1, Win 10 Home
If you open the terminal on one monitor, move your mouse to another monitor and press the hotkey to close it, the whole window is moved to the second monitor and the animation is player there.
Caching the monitor it opened on and then using that info on the closing animation should fix it.
Hey, while running fullscreen games the terminal doesn't open from the key combo, or it will swap like an alt+tab to the now opening terminal, unsure if this is due to (respectively) a grabbed focus on the fullscreen application, or an inability to draw overtop of a fullscreen application.
I do know that some fullscreen applications (or all) have a grab on the screen that may impact or completely block the functionality that I'm hoping for, though maybe this has changed, or even so, not usually used by applications. Even so, if this can be fixed/added, would allow for use at any time, anywhere.
This may be a bug or functionality improvement. uncertain.
Running the command line scoop install https://github.com/flyingpie/windows-terminal-quake/blob/master/scoop/windows-terminal-quake.json
fails with the error:
ConvertFrom-Json: C:\Users\**********\scoop\apps\scoop\current\lib\manifest.ps1:25
Line |
25 | $str | convertfrom-json
| ~~~~~~~~~~~~~~~~
| Conversion from JSON failed with error: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.Couldn't find manifest for 'https://github.com/flyingpie/windows-terminal-quake/blob/master/scoop/windows-terminal-quake.json'.
When I set HideOnFocusLost
to true
and click outside the terminal, it disappears as expected but keeps the keyboard focus. This is easiest to see when clicking a text box in another program (for example the GitHub issue form) and starting to type. The typed text doesn't appear in the text box but as soon as you re-open the terminal you see your text there.
after about 3 hours or so or repeated (50-60+) minimise/unminimise on windows 1904.21 (slow ring) with wsl2 the gui and mouse starts lagging and hanging similarly to how heavy i/o wait can effect the windows gui. isolation has shown its not the windows terminal (v0.8) and not wsl2 specificly (doesnt do it without quake app running)
noones reported it so im assuming its just me. im running a surface pro 7 i7 16gig and no other significant apps other than chrome.
just thought id mention it in case im not the only one experiencing this - i suspect it could be a result of the pre release version of windows potentially, but anyway just documenting just in case :)
thanks!
Hello,
I would like to avoid the effect of docking and decoupling of the panel and just let the panel drop.
This effect should have an option in the configuration file to activate/deactivate it.
Regards
How to add blur to the opacity of the terminal?
Thanks
Great app!
One thing is that I cannot disable default hotkeys CTRL+~
and CTRL+Q
, even if I have only WIN+~
in configuration.
Default hotkeys are clashing with other hotkeys that I have and used to, besides I don't need 3 shortcuts to toggle Terminal.
My config:
{
"HotKeys": [
{
"Modifiers": "Windows",
"Key": "OemTilde"
}
],
"Notifications": true,
"Opacity": 90,
"ToggleDurationMs": 0,
"VerticalScreenCoverage": 100,
"HorizontalScreenCoverage": 100
}
So here is the use case.
I am trying to create a context menu entry for opening windows-terminal-quake in the selected directory, But I cannot figure out how and if we can pass arguments to the windows terminal for the working directory.
With the default configuration of both the companion app and Windows Terminal (Preview), the Terminal windows is shown in maximized mode at the start off the companion app. Only when pressing the configured hotkey, the Terminal window is restored to the configured state, and then hides. Any subsequent activation using the hotkey shows the window as intended.
windows-terminal-quake version: 1.1.1-2021-02-07_1615
Windows Terminal Preview version: 1.7.572.0
I have 2 monitors, one above the other. If I press the key to reveal windows-terminal-quake on my bottom monitor, the window appears at the bottom of my top monitor, then slides down to the bottom one. This looks really odd.
I have worked around this by setting ToggleDurationMs and ToggleAnimationFrameTimeMs to 15, effectively disabling the animation.
I am assuming this is a false positive having to do with dotnet core as I found references to a similar situation happening with the dotnet sdk itself when people are building it from source (dotnet/runtime#35167) but just figured I'd let you know that this is happening:
Would you be interested in unit tests for this project?
Since I've not created many tests in c# before and I'd like to learn how to do it, I would be willing to contribute some.
Do you have a suggested approach or specific libraries you would use?
I'm using and loving it ❤️
I found one problem when giving and Alt +Tab
If i am terminal open and press Alt + Tab it doesn't exit correctly.
When calling after Alt + Tab it exit and then i need to calling for second time
The horizontal/vertical alignment settings don't seem to be respected for versions newer than v0.11. On my ultrawide monitor a full width dropdown is a bit much so I have it configured to appear on the left side and occupying about 50% of the monitor's width with a bit of padding at the top which works fine on 0.11 but any newer version ignores the vertical padding and horizontal left alignment settings completely. I can provide screenshots if necessary but here is the config in question:
{
// The keys that can be used to toggle the terminal.
// See "HotKeys" bellow for possible values.
"HotKeys": [
{
"Modifiers": "Windows",
"Key": "OemTilde"
}
],
// Whether to show notifications when the app starts and when the settings are reloaded.
"Notifications": true,
// Make the window see-through (applies to the entire window, including the title bar).
// 0 (invisible) - 100 (opaque)
"Opacity": 100,
// How long the toggle up/down takes in milliseconds.
"ToggleDurationMs": 0,
// How much room to leave between the top of the terminal and the top of the screen.
"VerticalOffset": 100,
// How far the terminal should come down, in percentage (eg. 50 = half way, 100 = full screen).
"VerticalScreenCoverage": 65,
// When "HorizontalScreenCoverage" is below 100, this setting determines where the terminal is place horizontally.
// "Center", "Left" or "Right".
"HorizontalAlign": "Left",
// How much horizontal space the terminal should use. When this is below 100, the terminal is centered.
// This can also be above 100, which can be useful to compensate for the window not always taking a 100% of the screen width,
// due to the terminal being bound to column widths (eg. try 100.5 or 101).
"HorizontalScreenCoverage": 55,
// When clicking or alt-tabbing away to another app, the terminal will automatically (and instantly) hide.
"HideOnFocusLost": true,
// Whether to keep the terminal window always on top (requires restart).
"AlwaysOnTop": false
// # HotKeys
// ## Modifiers
// Alt, Control, Shift, Windows
//
// ## Key
// ### Special keys
// Alt, Back, CapsLock, Control, Escape, LControlKey, LShiftKey, LWin, RControlKey, RShiftKey, RWin, Shift, Space, Tab
//
// ### Middle part of the keyboard
// Delete, End, Home, Insert, PageDown, PageUp, PrintScreen
// Down, Left, Right, Up
//
// ### Number keys
// D0 - D9
//
// ### Letters
// A-Z
//
// ### Numpad
// NumPad0 - NumPad9
// Add, Decimal, Divide, Multiply, NumLock, Separator, Subtract
//
// ### Function keys
// F1 - F24
//
// ### Special characters
// OemBackslash, OemClear, OemCloseBrackets, Oemcomma, OemMinus, OemOpenBrackets,
// OemPeriod, OemPipe, Oemplus, OemQuestion, OemQuotes, OemSemicolon, Oemtilde
// Oem1 - Oem8, Oem102
}
Suggested installation command for scoop doesn't work, would suggest changing this...
scoop install https://github.com/flyingpie/windows-terminal-quake/blob/master/scoop/windows-terminal-quake.json
... to this...
scoop install https://raw.githubusercontent.com/flyingpie/windows-terminal-quake/master/scoop/windows-terminal-quake.json
Difference is that in the second command it's using the raw/plaintext version of the JSON file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.