windows-desktop-switcher
windows-desktop-switcher copied to clipboard
Separate function definitions from general script settings
I would like to include functions from this script in my other scripts, but I do not want to include user_config
file.
That would be really nice, as it would allow the repository to be used as a submodule and people would just have their own file with hotkeys. Currently, as desktop_switcher.ahk
includes user_config.ahk
, it's not possible to load the desktop_switcher.ahk
with custom config without changing the user_config.ahk
contents.
After the change, it would look like this:
+- windows-desktop-switcher (submodule)
| |
| +- functions.ahk
| +- desktop-switcher.ahk
| +- user_config.ahk
|
+- my-desktop-switcher.ahk (loads my-user-config.ahk and functions.ahk)
+- my-user-config.ahk (contains my hotkeys)
@grpawel VD.ahk is a class you #Include
it had no #Include
inside, no .dll
dependencies
example usage:
#Include path\to\VD.ahk
VD.createUntil(3) ;3 virtual desktops
VD.PinWindow("ahk_exe explorer.exe")
Numpad0::VD.TogglePinWindow("A") ;active window
modded example from : https://github.com/pmb6tz/windows-desktop-switcher/issues/73#issuecomment-1006921377