Skip to content

Instantly share code, notes, and snippets.

@heiswayi
Last active March 1, 2025 04:11
Show Gist options
  • Save heiswayi/f8f59bebcda952aef751f9ed719eff06 to your computer and use it in GitHub Desktop.
Save heiswayi/f8f59bebcda952aef751f9ed719eff06 to your computer and use it in GitHub Desktop.
Emulate Quake Mode with AutoHotkey - https://www.autohotkey.com/
; 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
; 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