Skip to content

Instantly share code, notes, and snippets.

@cybardev
Created August 27, 2021 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cybardev/832c56779180e18558d2322419ac6728 to your computer and use it in GitHub Desktop.
Save cybardev/832c56779180e18558d2322419ac6728 to your computer and use it in GitHub Desktop.
Windows Terminal Dropdown
; variables to change
$termName = "wt.exe" ; terminal program
$tabName = "Kali" ; default tab name
$hotKey = "#`" ; dropdown hotkey
; start terminal and trigger dropdown
Run($termName)
WinWaitActive($tabName)
Send($hotKey)
WinWaitActive($tabName)
; check for dropdown
If WinGetPos($tabName)[0] < 0 Then
; hide dropdown then close window
Send($hotKey)
WinWaitActive($tabName)
WinClose($tabName)
Else
; close window then hide dropdown
WinClose($tabName)
WinWaitActive($tabName)
Send($hotKey)
EndIf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment