Skip to content

Instantly share code, notes, and snippets.

@oriolrius
Last active July 18, 2018 05:48
Show Gist options
  • Save oriolrius/e1f5f3f554277f8dfc0a2d95d48051ff to your computer and use it in GitHub Desktop.
Save oriolrius/e1f5f3f554277f8dfc0a2d95d48051ff to your computer and use it in GitHub Desktop.
Youtube video: https://youtu.be/B1wMVIObXR4 --- Your linux shell just one click away using Widows 10. Autohotkey allows key binds to super powerful scripts, thanks to that I created a small script for assigning my WSL bash shell to the F1 button and show/hide the shell everytime I click the F1. This is exactly how I do that in linux using Yakuake.
#WinActivateForce
#SingleInstance force
runApp(exe) {
IfWinExist, ahk_exe %exe%
{
IfWinActive
{
WinMinimize
return
}
} else {
Run, %exe%
WinWait, ahk_exe %exe%,, 4
}
WinRestore
WinActivate
WinSet, Top
SysGet, NumMon, MonitorCount
if ( NumMon > 2 ) {
WinMove,,, 1920, 0, 1850, 1080
} else {
WinMove,,, 0, 0, 1850, 1050
}
; WinSet, Style, -0x200000; HSCROLL
WinSet, Style, -0xC00000; WINDOW TITLE
return
}
F1::
runApp("c:\windows\system32\bash.exe")
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment