FuPeiJiang / VD.ahk

Windows Virtual Desktop, AutoHotkey, Windows 11 support, Windows Server 2022, switch desktop, move window(wintitle) to current desktop; createDesktop, PinWindow, getCount, getDesktopNumOfWindow -> mute all windows in Virtual Desktop
MIT License
319 stars 45 forks source link

How to cycle back to first desktop when at the last? #28

Open gaberiel44 opened 1 year ago

gaberiel44 commented 1 year ago

Hello,

I have been using this tool and thus far I really like it, thanks for making it!

One thing that is proving to be a pain.

When moving active window to previous\next desktops. Its possible to cycle back to first, if at the last desktop.

The program is smart enough to recognise that when I am at the last desktop it will move the window to the first desktop.

Is it possible to do this when switching virtual desktops? so that if I am at the last desktop, invoking next desktop will go to the first desktop.

Looking at the examples provided I was not able to find this functionality. Thanks!

FuPeiJiang commented 1 year ago

It wasn't possible, I thought only MoveWindowToRelativeDesktopNum() was needed since only that was specifically requested without requesting both MoveWindowToRelativeDesktopNum() and gotoRelativeDesktopNum()

gaberiel44 commented 1 year ago

I see, well can I make request for this feature I am asking about then? I sorely need it please consider it. Thanks.

FuPeiJiang commented 1 year ago

FuPeiJiang added a commit that referenced this issue 4 hours ago

if you see this above my message, it means I added it (I guess it's an indirect way of saying: I added it), you just need to update/redownload

I also added this to README.md:

; wrapping / cycle back to first desktop when at the last
^#left::VD.goToRelativeDesktopNum(-1)
^#right::VD.goToRelativeDesktopNum(+1)
gaberiel44 commented 1 year ago

Amazing! Thank you so much for implementing this request. Its sooo much better now!