Skip to content

Instantly share code, notes, and snippets.

@ivan-marquez
Forked from atruskie/terminal-keybind.ahk
Created January 15, 2021 00:08
Show Gist options
  • Save ivan-marquez/55b1d61228c0a4465416b27c6f4b511f to your computer and use it in GitHub Desktop.
Save ivan-marquez/55b1d61228c0a4465416b27c6f4b511f to your computer and use it in GitHub Desktop.
AutoHotkey script to bind Win+~ keyboard shortcut to Windows Terminal
#NoEnv
#SingleInstance force
SendMode Input
DetectHiddenWindows, on
SetWinDelay, 0
#`::
terminal := WinExist("ahk_exe WindowsTerminal.exe")
if (terminal)
{
active := WinActive("ahk_id " terminal)
if (active)
WinMinimize, ahk_id %active%
else
WinActivate, ahk_id %terminal%
}
else
Run, wt.exe
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment