Skip to content

Instantly share code, notes, and snippets.

@dunckr
Created March 11, 2014 17:08
Show Gist options
  • Select an option

  • Save dunckr/9490306 to your computer and use it in GitHub Desktop.

Select an option

Save dunckr/9490306 to your computer and use it in GitHub Desktop.
autohotkey
; Variables definition
; -----------------------------------------------------------------------------
EnvGet, userProfile, USERPROFILE
; Launch or toggle program, http://lifehacker.com/5468862/create-a-shortcut-key-for-restoring-a-specific-window
; -----------------------------------------------------------------------------
ToggleWinMinimize(WindowTitle)
{
SetTitleMatchMode,2
DetectHiddenWindows, Off
IfWinActive, %WindowTitle%
WinMinimize, %WindowTitle%
Else
IfWinExist, %WindowTitle%
{
WinActivate
}
Return
}
!c::ToggleWinMinimize("Google Chrome")
!s::ToggleWinMinimize("Sublime Text")
!g::ToggleWinMinimize("GVIM")
!f::ToggleWinMinimize("Firefox")
!o::ToggleWinMinimize("Microsoft Outlook")
; Remapping
; ------------------------------------------------------
Capslock::Esc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment