summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AutoHotkey/hotkeys.ahk30
1 files changed, 25 insertions, 5 deletions
diff --git a/AutoHotkey/hotkeys.ahk b/AutoHotkey/hotkeys.ahk
index 662d610..6ef62b2 100644
--- a/AutoHotkey/hotkeys.ahk
+++ b/AutoHotkey/hotkeys.ahk
@@ -32,6 +32,31 @@ DetectHiddenWindows true
}
}
+;WSL
+#w::
+{
+ ; Check if WSL is running
+ if WinExist("ahk_class ConsoleWindowClass ahk_exe wsl.exe" )
+ {
+ ; If WSL is already in the foreground, minimize it
+ if WinActive("ahk_class ConsoleWindowClass ahk_exe wsl.exe" )
+ {
+ WinMinimize("ahk_class ConsoleWindowClass ahk_exe wsl.exe")
+ }
+ else
+ {
+ ; If WSL is running but not in the foreground, bring it to the foreground
+ WinActivate("ahk_class ConsoleWindowClass ahk_exe wsl.exe")
+ }
+ }
+ else
+ {
+ ; If WSL is not running, launch it
+ Run(UserPath . "wsl.exe")
+ if WinWait("ahk_class ConsoleWindowClass ahk_exe wsl.exe", , 5)
+ WinActivate("ahk_class ConsoleWindowClass ahk_exe wsl.exe")
+ }
+}
;Emacs
#n::
{
@@ -200,9 +225,4 @@ DetectHiddenWindows true
WinActivate("Claude")
}
}
- else
- {
- ; If AI is not running, launch it
- Run("Claude.exe")
- }
}
Back to https://optics-design.com