Last active
March 1, 2025 04:11
-
-
Save heiswayi/f8f59bebcda952aef751f9ed719eff06 to your computer and use it in GitHub Desktop.
Emulate Quake Mode with AutoHotkey - https://www.autohotkey.com/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Ctrl + ` | |
^`:: | |
; Check if Windows Terminal is already running | |
IfWinExist, ahk_exe WindowsTerminal.exe | |
{ | |
; If visible, hide it; if hidden, show it | |
WinGet, winState, MinMax, ahk_exe WindowsTerminal.exe | |
if (winState = 0) ; window is normal (visible) | |
{ | |
WinHide, ahk_exe WindowsTerminal.exe | |
} | |
else | |
{ | |
WinShow, ahk_exe WindowsTerminal.exe | |
WinActivate, ahk_exe WindowsTerminal.exe | |
} | |
} | |
else | |
{ | |
; Launch Windows Terminal | |
Run, wt.exe | |
; Wait for it to open and then adjust its position and size | |
WinWait, ahk_exe WindowsTerminal.exe | |
; Position the window: top, full width, 50% screen height | |
SysGet, ScreenWidth, 78 | |
SysGet, ScreenHeight, 79 | |
NewHeight := ScreenHeight // 2 | |
WinMove, ahk_exe WindowsTerminal.exe, , 0, 0, ScreenWidth, NewHeight | |
WinActivate, ahk_exe WindowsTerminal.exe | |
} | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Ctrl + Alt + T | |
^!t:: | |
{ | |
Run, wt -w _quake | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment