Home > Mobile >  How Programatically Change Spaces Sequence?
How Programatically Change Spaces Sequence?

Time:10-27

enter image description here In the Picture above Mission Control is Launched, and we can see the Space Sequence:

[Mesa 1, Safari, Xcode, Discord, Mesa 2]

How can is possible change this sequence using Swift or Objective-C?

CodePudding user response:

Depends on whether you want to use private API. There are a few github projects that support that functionality.

https://github.com/JulianEberius/qsx/blob/master/src/objc/CGSPrivate.h#L197-L198

https://github.com/lwouis/alt-tab-macos/issues/14

https://github.com/koekeishiya/yabai

This one even says it can do it without private API:

https://github.com/bigbearlabs/SpaceSwitcher

EDIT: as for the last one, I initially misunderstood your question that you want to switch to a different space which is not the actual question (my bad, this is how I found the question). Anyway, the aspect of the answer about using private API still holds. Though you probably will have to dig deep to find how...

CodePudding user response:

For there to be a way to do that, Mission Control would have to have a publicly exposed API. I don't believe that it does and there is no way to accomplish what you are trying to do. You could send a feedback request to Apple and ask them to add that functionality.

  • Related