pmb6tz/windows-desktop-switcher

How to disable auto-cycles

exsabuta opened this issue · 2 comments

Hi. Tell me please, how i can disable auto-cycles from the first to the last desktop?

Hi! Thanks for asking.

Two lines are responsible for that. Switching desktop to right:

_switchDesktopToTarget(CurrentDesktop == DesktopCount ? 1 : CurrentDesktop + 1)

Switching desktop to left:
_switchDesktopToTarget(CurrentDesktop == 1 ? DesktopCount : CurrentDesktop - 1)

Change them to these, respectively:

_switchDesktopToTarget(CurrentDesktop == DesktopCount ? CurrentDesktop : CurrentDesktop + 1)
_switchDesktopToTarget(CurrentDesktop == 1 ? CurrentDesktop : CurrentDesktop - 1)

Then reload (shutdown and start again) the script again for the changes to be applied.

Please let us know if it works for you!

It works! Thanks!