Last active
March 27, 2023 19:43
-
-
Save gene-pavlovsky/97da0fa85bbf323fb8b0716991f1d558 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EnvGet, ProgramFiles32, ProgramFiles(x86) | |
EnvGet, ProgramFiles64, ProgramFiles | |
if (!ProgramFiles32) | |
ProgramFiles32 := ProgramFiles64 | |
; ************************************************************************************************************************************************************ | |
; Run/show/hide KeePassXC using Win+K | |
; | |
#k:: | |
if (WinExist("ahk_exe KeePassXC.exe") && WinActive("ahk_exe KeePassXC.exe")) | |
WinMinimize | |
else | |
Run % ProgramFiles64 . "\KeePassXC\KeePassXC.exe" | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@valner88 What is described in the comment on line 7 - runs, shows or hides KeePassXC (depending on it's current state), when you press Windows key and K simultaneously.
Similar to how (on Windows 7+) you can run/show/hide an app pinned to your taskbar by using Windows key and a corresponding digit 1-9.
I use various other similar shortcuts to make it quick to switch between commonly used apps. Some apps that hide to tray on minimize are a bit more tricky to unhide (WinExist returns false for the hidden window, you have to use some options like detect hidden windows etc), KeePassXC is actually one of them, I had a script that worked for a while but stopped working with another KeePassXC update, in the end I gave up and just disable the hide to tray option in it's settings.