Last active
March 10, 2025 15:35
-
-
Save shmup/ed6315c2fb8a04890b739014fce05608 to your computer and use it in GitHub Desktop.
like i3, mod+n goes to the appropriate workspace (if exists)
This file contains hidden or 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
; AHK v2 script | |
SetWorkingDir(A_ScriptDir) | |
; https://github.com/Ciantic/VirtualDesktopAccessor | |
VDA_PATH := A_ScriptDir . "\VirtualDesktopAccessor.dll" | |
hVirtualDesktopAccessor := DllCall("LoadLibrary", "Str", VDA_PATH, "Ptr") | |
GoToDesktopNumberProc := DllCall("GetProcAddress", "Ptr", hVirtualDesktopAccessor, "AStr", "GoToDesktopNumber", "Ptr") | |
GoToDesktopNumber(num) { | |
global GoToDesktopNumberProc | |
DllCall(GoToDesktopNumberProc, "Int", num, "Int") | |
return | |
} | |
; Win+1 through Win+9 to switch to corresponding virtual desktop | |
#1::GoToDesktopNumber(0) ; Desktop numbering starts at 0 | |
#2::GoToDesktopNumber(1) | |
#3::GoToDesktopNumber(2) | |
#4::GoToDesktopNumber(3) | |
#5::GoToDesktopNumber(4) | |
#6::GoToDesktopNumber(5) | |
#7::GoToDesktopNumber(6) | |
#8::GoToDesktopNumber(7) | |
#9::GoToDesktopNumber(8) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment