From 0ede748577b45f3d9ed91a0fdaf142953fe7a744 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 26 Apr 2025 22:57:28 +0200 Subject: Initial Commit --- AutoHotkey/hotkeys.ahk | 247 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 AutoHotkey/hotkeys.ahk (limited to 'AutoHotkey') diff --git a/AutoHotkey/hotkeys.ahk b/AutoHotkey/hotkeys.ahk new file mode 100644 index 0000000..1415c3f --- /dev/null +++ b/AutoHotkey/hotkeys.ahk @@ -0,0 +1,247 @@ +UserPath := EnvGet("USERPROFILE") +syncPath := EnvGet("SYNC") +DetectHiddenWindows true +#SuspendExempt +^!o::Suspend ; Ctrl+Alt+o +#SuspendExempt False +;Windows Terminal +^+,:: +{ + ; Check if Windows Terminal is running + if WinExist("ahk_exe WindowsTerminal.exe" ) + { + ; If Windows Terminal is already in the foreground, minimize it + if WinActive("ahk_exe WindowsTerminal.exe" ) + { + WinMinimize("ahk_exe WindowsTerminal.exe") + } + else + { + ; If Windows Terminal is running but not in the foreground, bring it to the foreground + WinActivate("ahk_exe WindowsTerminal.exe") + } + } + else + { + ; If Windows Terminal is not running, launch it + Run(UserPath . "\scoop\apps\windows-terminal\current\WindowsTerminal.exe") + } +} +;WSL +^+.:: +{ + ; Check if WSL is running + if WinExist("ahk_exe wsl.exe" ) + { + ; If WSL is already in the foreground, minimize it + if WinActive("ahk_exe wsl.exe" ) + { + WinMinimize("ahk_exe wsl.exe" ) + } + else + { + ; If WSL is running but not in the foreground, bring it to the foreground + WinActivate("ahk_exe wsl.exe" ) + } + } + else + { + ; If WSL is not running, launch it + Run("C:\Program Files\WSL\wsl.exe --distribution-id {ae70865d-7235-4943-9970-24cee46c9be2} --cd %USERPROFILE%") + } +} +;Neovide +^+/:: +{ + ; Check if Neovide is running + if WinExist("ahk_class Window Class ahk_exe neovide.exe") + { + ; If Neovide is already in the foreground, minimize it + if WinActive("ahk_class Window Class ahk_exe neovide.exe") + { + WinMinimize("ahk_class Window Class ahk_exe neovide.exe") + } + else + { + ; If Neovide is running but not in the foreground, bring it to the foreground + WinActivate("ahk_class Window Class ahk_exe neovide.exe" ) + } + } + else + { + ; If Neovide is not running, launch it + Run(UserPath . "\scoop\apps\Neovide\current\neovide.exe") + } +} + +;Emacs +!+,:: +{ + + ; Check if Emacs is running + if WinExist("ahk_class Emacs ahk_exe emacs.exe") + { + ; If Emacs is already in the foreground, minimize it + if WinActive("ahk_class Emacs ahk_exe emacs.exe") + { + WinMinimize("ahk_class Emacs ahk_exe emacs.exe") + } + else + { + ; If Emacs is running but not in the foreground, bring it to the foreground + WinActivate("ahk_class Emacs ahk_exe emacs.exe" ) + } + } + else + { + ; If Emacs is not running, launch it + Run(UserPath . "\scoop\apps\emacs\current\bin\emacsclientw.exe -c") + } +} +;Obsidian +!+.:: +{ + + ; Check if Obsidian is running + if WinExist("ahk_class Chrome_WidgetWin_1 ahk_exe Obsidian.exe") + { + ; If Obsidian is already in the foreground, minimize it + if WinActive("ahk_class Chrome_WidgetWin_1 ahk_exe Obsidian.exe") + { + WinMinimize("ahk_class Chrome_WidgetWin_1 ahk_exe Obsidian.exe") + } + else + { + ; If Obsidian is running but not in the foreground, bring it to the foreground + WinActivate("ahk_class Chrome_WidgetWin_1 ahk_exe Obsidian.exe" ) + } + } + else + { + ; If Obsidian is not running, launch it + Run(UserPath . "\scoop\apps\obsidian\current\Obsidian.exe") + } +} +;Zotero +!+/:: +{ + + ; Check if Zotero is running + if WinExist("ahk_class MozillaWindowClass ahk_exe zotero.exe") + { + ; If Zotero is already in the foreground, minimize it + if WinActive("ahk_class MozillaWindowClass ahk_exe zotero.exe") + { + WinMinimize("ahk_class MozillaWindowClass ahk_exe zotero.exe") + } + else + { + ; If Zotero is running but not in the foreground, bring it to the foreground + WinActivate("ahk_class MozillaWindowClass ahk_exe zotero.exe" ) + } + } + else + { + ; If Zotero is not running, launch it + Run(UserPath . "\scoop\apps\zotero\current\zotero.exe") + } +} +;Telegram +^!,:: +{ + + ; Check if Telegram is running + if WinExist("ahk_exe Telegram.exe") + { + ; If Telegram is already in the foreground, minimize it + if WinActive("ahk_exe Telegram.exe") + { + WinMinimize("ahk_exe Telegram.exe") + } + else + { + ; If Telegram is running but not in the foreground, bring it to the foreground + WinActivate("Telegram" ) + } + } +} + +;Browser +^!.:: +{ + + ; Check if Browser is running + if WinExist("ahk_class MozillaWindowClass ahk_exe librewolf.exe") + { + ; If Browser is already in the foreground, minimize it + if WinActive("ahk_class MozillaWindowClass ahk_exe librewolf.exe") + { + WinMinimize("ahk_class MozillaWindowClass ahk_exe librewolf.exe") + } + else + { + ; If Browser is running but not in the foreground, bring it to the foreground + WinActivate("ahk_class MozillaWindowClass ahk_exe librewolf.exe" ) + } + } + else + { + ; If Browser is not running, launch it + Run(UserPath . "\scoop\apps\librewolf\current\LibreWolf-Portable.exe") + } +} +;Audacious +^!/:: +{ + + ; Check if Audacious is running + if WinExist("ahk_class Qt672QWindowIcon ahk_exe audacious.exe") + { + ; If Audacious is already in the foreground, minimize it + if WinActive("ahk_class Qt672QWindowIcon ahk_exe audacious.exe") + { + WinMinimize("ahk_class Qt672QWindowIcon ahk_exe audacious.exe") + } + else + { + ; If Audacious is running but not in the foreground, bring it to the foreground + WinActivate("ahk_class Qt672QWindowIcon ahk_exe audacious.exe" ) + } + } + else + { + ; If Audacious is not running, launch it + Run(UserPath . "\scoop\apps\audacious\current\bin\audacious.exe") + } +} +;Bookmark Finder +^/:: +{ + ; Run the batch file + Run(syncPath . "\Repos\Windows\Batch_tools\bookmarkfinder\bookmarkfinder.bat") +} + +;AI +^!i:: +{ + + ; Check if AI is running + if WinExist("Claude") + { + ; If AI is already in the foreground, minimize it + if WinActive("Claude") + { + WinMinimize("Claude") + } + else + { + ; If AI is running but not in the foreground, bring it to the foreground + WinActivate("Claude") + } + } + else + { + ; If AI is not running, launch it + Run("Claude.exe") + } +} -- cgit v1.2.3