Skip to content

Instantly share code, notes, and snippets.

@StanAngeloff
Created September 11, 2010 20:27
Show Gist options
  • Save StanAngeloff/575520 to your computer and use it in GitHub Desktop.
Save StanAngeloff/575520 to your computer and use it in GitHub Desktop.
MinTTY at your fingertips
; AutoHotkey script, download from:
; http://www.autohotkey.com/
; NOTE: Save this file with Windows line endings i.e. \r\n
;
cmd_line := "C:\bin\cygwin\bin\mintty.exe /bin/zsh --login"
wnd_class := "ahk_class mintty"
#c::
DetectHiddenWindows, on
Maximize()
{
global
WinShow
WinActivate
WinGetPos, X, Y, Width, Height
SysGet, FullScreenWidth, 78
SysGet, FullScreenHeight, 79
If (X <> 0) or (Y <> 0) or (Width <> FullScreenWidth) or (Height <> FullScreenHeight)
{
Send !{Enter}
}
}
If WinExist(wnd_class)
{
IfWinActive
{
WinMinimize
WinHide
}
Else
{
Maximize()
}
}
Else
{
Run % cmd_line, , Hide
WinWait % wnd_class, , 5
If ErrorLevel
{
MsgBox, WinWait timed out. Please try pressing Win+C again.
}
Else
{
Maximize()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment