Native Instant Space Switching on macOS
151 points by PaulHoule 3 hours ago | 70 comments

aylmao 42 minutes ago
I grew up with this animation so I didn't consider it annoying until I bought a new Macbook a couple years ago.

I noticed sometimes I would press keyboard shortcuts before my system's focus had switched. Just little stumbles here and there, some inoffensive, some annoying, but who knows maybe I didn't catch enough sleep.

Over time it happened often enough that I decided to google it, and it turns out my muscle memory wasn't failing me; the animation speed did change ever so slightly and was slower in new Macs with 120Hz displays [1][2] (newer MacBooks, 2021+). If you switch your screen to 60Hz it goes back to the faster animation.

Why is this animation slower now, and why does it depend on screen refresh rate? I have some technical theories but can't think of an organizational reason it happened and hasn't been fixed 5 years later at a 3.82 trillion market cap company. If you Google it there's plenty of discussions online about this. It's noticeable and annoying to people who have used the feature often enough.

[1]: https://discussions.apple.com/thread/256124324?sortBy=rank

[2]: https://www.youtube.com/watch?v=gNBWt4NvqHg

reply
veber-alex 8 minutes ago
This is such an insane bug to still have around all this years.

Are apple engineers not using macOS?

reply
tranceylc 22 minutes ago
I would assume it’s something based around whatever deacceleration animation it is calculating? So in the inverse of what you would see in games that don’t support uncapped framerates. It would at least explain why the refresh rate has an inverted relationship
reply
flawn 3 minutes ago
Hey! I built InstantSpaces (which you had linked in the footnotes) and am well aware of issues with the injection & patching. It works 90% of the time for me and was good enough for me to share. But there are cases where it bugs. And yes, Tahoe is a to-do.

I will hopefully soon have the time to try to make it more robust. Feel free to take a shot at it if you want!

reply
xz18r 51 minutes ago
I see yabai mentioned, definitely check out Aerospace. Ive tried multiple WMs after years of i3 on Linux and this is the best one I found (for me) with quite a margin. It just works (tm)

https://github.com/nikitabobko/AeroSpace

reply
tytho 10 minutes ago
I was a heavy macOS Spaces user. Upon a recommendation to use Aerospace from somewhere else here a few months ago, I switched and love it. I considered Yabai, but some features required disabling SIP (System Integrity Protection).
reply
Nevermark 41 minutes ago
Tangentially related.

After a restart, and after Finder has opened multi-tab windows I have open before, clicking on a tab can suddenly move my view and the window to another space.

Apparently different tabs in the same window can think they belong to different spaces.

Something (I perceive as) common to a lot of the (perceived) increase in Apple software glitches recently, is I cannot fathom the logic for which the bug makes any sense. It does not feel like I am seeing corner case bugs, but instead major "bad-model" code, revealing its poor design.

reply
tptacek 2 hours ago
God damnit I didn't know until 15 seconds ago that the Space-switching animation in macOS was annoying. Thanks a lot!
reply
el_benhameen 43 minutes ago
Just wait until you notice that it’s inexplicably slower on 120hz monitors and that your input devices remain focused on the previous space until the animation fully completes!
reply
JumpCrisscross 12 minutes ago
> our input devices remain focused on the previous space until the animation fully completes

This strikes me as the fuckup more than anything else.

reply
Cider9986 47 minutes ago
I switched to Fedora Asahi Remix[1] after being affected by this bug[2] after 5 releases of MacOS Tahoe. I am enjoying Asahi Remix with Gnome and it has sensicle window management.

[1] https://asahilinux.org/fedora/ [2] https://youtube.com/watch?v=JjptYWKGVc4

reply
hmokiguess 6 minutes ago
Can you use this with the trackpad gesture though? That's the only thing that has me locked in, the muscle memory of trackpad is hard to beat for me and unfortunately I rather suffer through the animation then move to the keyboard
reply
phren0logy 2 hours ago
Having been ruined by Linux options like Hyperland and Niri, I’m digging my early foray into OmniWM - https://github.com/BarutSRB/OmniWM
reply
yuters 2 hours ago
It is very good even though it's in early development. Issues are getting fixed almost as fast as I can find them. I have to use macOS sometimes for work and OmniWM made it bearable.
reply
sgloutnikov 2 hours ago
Same boat and whoa this looks nice! Will give it a try thank you!
reply
al_borland 8 minutes ago
I don't use Spaces at all, probably in part because of the speed. I can't bring myself to run an application all the time to solve this, when it should just be a variable somewhere that needs to change.
reply
cosmic_cheese 2 hours ago
Clever hack. Now if there were some way to bring back the OS X 10.5/10.6 2D spaces grid… the linear design in place since 10.7 has always felt overly simplistic.
reply
wolvoleo 47 minutes ago
That is indeed the biggest thing I missed so much. When I finally moved from macOS to KDE I got the grid desktops back and I love them so much.

I have 9 virtual desktops and a 3x3 grid is so much easier to navigate than a row of 9. Also, Apple makes them dynamic now. I have each desktop assigned to a specific purpose. It's like having 9 computers at my fingertips.

Almost every release of macOS after 10.6 or so dropped something I used and the replacement if any was rarely good enough. So it started rubbing me the wrong way, more and more with every release. I'm so glad I'm no longer on an opinionated OS but that I have a desktop environment that cherishes configurability and options.

In keeping with this, for the transition animation you can choose several options like a fade and a slide, you can turn them off completely (as this hack does for macOS). You can even set the speed of some transitions. I have it set to slide but faster than normal. So the sliding gives me a little spatial awareness of where I move within the grid, but it still feels snappy. All just by ticking some options. I love KDE <3

reply
cosmic_cheese 25 minutes ago
I've tried KDE but unfortunately too much of it clashes with my preferences, even after spending quite a lot of time tinkering with its many config options. It's a nice project but I don't think it'll ever be for me, despite carrying features from older versions of macOS.
reply
nicoburns 2 hours ago
I'm still incredibly frustrated by Apple's Mission Control and Full Screen features. The old Expose and Spaces and windows-style maximise would be so much better.
reply
Analemma_ 35 minutes ago
I agree that I miss when spaces could be on a grid in Snow Leopard instead of only in a straight line, but what is wrong with Exposé? From my POV it works the same as it always has.
reply
mintplant 21 minutes ago
Awesome! Is there a working way to do the same for Windows virtual desktops? I remember I used to do it with ViVeTool [0], but Microsoft removed the feature flag at some point.

[0] https://github.com/thebookisclosed/ViVe

reply
AaronFriel 18 minutes ago
Turn off "Animation Effects" in Settings and it will be instantaneous.
reply
modeless 37 minutes ago
This is nice. Sounds like it wouldn't solve the slow animation when entering or leaving full screen mode though. I'm fed up enough with macOS's poor window management (among many other things) that I'm looking for MacBook alternatives.

The M5 chip is way ahead of Intel's latest, even Panther Lake. But the Snapdragon X2 Elite looks like a viable alternative. It's the only competitor with comparable single core performance, and it comes with 48 GB of extremely fast RAM for a reasonable price with great battery life. Unfortunately Linux support isn't really there yet, but hey M5 MacBooks don't support Linux well either.

reply
benji-york 2 hours ago
By way of experience report: I've been using this app for a week or so on my daily driver and it's been great.
reply
aequitas 2 hours ago
Wonderful, that leaves 2 things on the top of my list for spaces: having to hover your mouse over the top left corner of a space and waiting until it shows the closing icon. And Safari deciding its better to switch to a space and open a window that was minimised there instead of just opening a new window in the space i'm currently in (even with the "switch to a space" setting turned off!) when 1 want to open a new tab.
reply
vict7 2 hours ago
I have been dealing with the same issue and thought I was going crazy that the setting which purports to fix this exact behavior simply doesn’t work?
reply
aequitas 57 minutes ago
At least the setting does work in reducing the switching when you cmd-tab to an application with no open windows in the current space. But I think some of this annoying switching behaviour is application specific logic and they just didn't get it right with Safari, some other applications do get it right though.
reply
draw_down 2 hours ago
[dead]
reply
KaiserPro 19 minutes ago
There used to be a commanline switch that if you used command left/right to switch it was almost instant. I'm not sure if thats still a thing
reply
gechr 58 minutes ago
Nice. I wrote a little menubar app and Space switching has been a thorn in my side, including going down the "Yabai integration" route. Will have to take a look at this and see if I can borrow some ideas!

Shameless plug: https://github.com/gechr/WhichSpace

reply
isege 16 minutes ago
Christmas has come early! Thank you for sharing this
reply
rendx 59 minutes ago
I didn't check if it makes any difference, but I see hardly any animation with “Reduce motion” enabled.

The article mentions this has the unfortunate side effect of also setting prefers-reduced-motion in browsers, but that can be mitigated by changing the browser settings (Firefox: about:config: ui.prefersReducedMotion. 0 (enable) or 1 (disable)).

reply
houseofmvps 13 minutes ago
Great one. Thank you for sharing this.
reply
Fraterkes 2 hours ago
I'm new to MacOS, is the thing they're refering to when you swipe left/right with three fingers to switch between different fullscreen apps / desktops? I kinda like the animation, after decades of windows I'm still impressed when switching between programs isn't stuttery.
reply
rahimnathwani 2 hours ago
Yes, and the app they're recommending emulates that swipe, but really really fast, so it looks instant. And you don't have to swipe 8 times to go from #1 to #9.
reply
rwc 2 hours ago
Now do it 100x every day and see if it gets old :)
reply
satvikpendem 2 hours ago
It get annoying after a while, especially if you're swiping a lot, such as having an IDE and test app / Simulator in one space and a browser in another.
reply
hhh 2 hours ago
it just blends into the background for me personally, i found it annoying a little when i swapped from multiple monitors to one
reply
Aaronstotle 47 minutes ago
I think it was iOS 9 that had some glitch where the animations were completely disabled and it was a really awesome experience to click an app and have it instantly open with zero animations.
reply
toddmorey 28 minutes ago
> it works by simulating a trackpad swipe with a large amount of velocity

Damn, that's rather clever.

reply
ray__ 2 hours ago
This looks interesting and I will give it a try. I agree that the space-switching animation is painful.

I don't however think that this will solve spaces on MacOS, for the simple reason that opening new instances of apps is inconsistent and often doesn't behave how you'd expect it to once one more than one space is involved (in my experience, anecdotal).

I've come to peace with the fact that I will never be able to simultaneously experience the productivity of i3 and the necessary evil of MS Office/Illustrator on the same OS. The most important factor in my work is who I work with (rather than what I work with) so I'll remain on the latter train for now.

reply
satvikpendem 2 hours ago
Why not use a macOS i3-like window manager like yabai or komorebi (paid)?
reply
lynndotpy 2 hours ago
This is addressed in the post.

> There are only two problems: for one, yabai does this by binary patching a part of the operating system. This is only possible by disabling System Integrity Protection at your own discretion. For the second, installing yabai forces you to learn and use it as your tiling window manager1. I personally use PaperWM.spoon as my window manager. Both of which are incompatible when installed together.

reply
satvikpendem 2 hours ago
I was referring to their last line ("I will never be able to simultaneously experience the productivity of i3 and the necessary evil of MS Office/Illustrator on the same OS") not the linked article because the parent doesn't "think that this will solve spaces on MacOS" therefore I gave a suggestion that would.

Secondly I don't find anything that bad about why the article's author doesn't want to use yabai, I generally disable SIP anyway (because I want to install anything I want without restriction, even edit system files because that's necessary in some cases, as yabai does); and they just don't want to learn a new WM which is fine for them but isn't a valid reason for everyone to not use yabai.

reply
niij 2 hours ago
You can turn tiling off

`yabai -m rule --add app=".*" manage=off`

reply
FireBeyond 2 hours ago
> for the simple reason that opening new instances of apps is inconsistent and often doesn't behave how you'd expect it to once one more than one space is involved

System Settings > Desktop & Dock "Automatically rearrange Spaces based on most recent use". This is the critical part.

And then right click App on the Dock, Assign to this Dock.

With these two things, Spaces becomes predictable and repeatable.

reply
ralphc 55 minutes ago
Works on my Intel mac running Sonoma 14.8.2. I use Omakub on my Linux machine and missed this when on my mac.
reply
airstrike 60 minutes ago
I wonder how this compares to Aerospace, which I use daily but ultimately has felt a bit janky and slow
reply
rwc 2 hours ago
Just installed and I have to say, works exactly as promised. This is a huge quality of life upgrade, thank you for sharing it Paul.
reply
walthamstow 2 hours ago
I never run more than one space and instead switch between windows with the app Alt Tab
reply
satvikpendem 2 hours ago
I do both, Alt-Tab works well for spaces as well since it can discriminate which window is in which space.
reply
theultdev 28 minutes ago
This is beyond stupid for macbook using trackpad gestures.

I can understand for mouse/kbd input though.

reply
throwatdem12311 2 hours ago
Can’t say that the sliding animation has ever been the bottleneck to my productivity.
reply
jgauth 55 minutes ago
I've seen this sentiment often. For example, in a discussion about slow nvm load times: "Does adding 0.5s delay to opening your terminal really affect your productivity?"

I agree that these small things are not bottlenecks to my productivity. I can work just fine despite them. However there is some intangible effect they have on my mindset when I'm working. The more "snappy" my computer feels, the easier it is to enter a sort of flow state. Small bits of friction here and there add up.

reply
IOT_Apprentice 44 minutes ago
A lifetime license for BetterTouchTool with ALL its features is $25. The time the author spent on this is well over that amount.
reply
jiehong 52 minutes ago
Outstanding!
reply
veber-alex 45 minutes ago
Wow, works great.

I used to use yabai for this but I can't disable SIP anymore on a work laptop.

Also, stuff like this is why I really hate macOS sometimes.

reply
adamnemecek 3 hours ago
What do people use for Windows-like window management on macos? I tried a bunch of them and I'm not a fan of any of them.

I actively dislike the notion of spaces.

reply
satvikpendem 2 hours ago
Rectangle with Alt-Tab (both open source), the latter is especially useful as I hate macOS' application- rather than window-level switching, Alt-Tab returns it to Windows-like behavior.
reply
Tempest1981 43 minutes ago
My Cmd-TAB frustration is I'm usually moving the mouse while I press it, causing the mouse to select some unwanted app. It doesn't help that the row of apps forms a solid bar across the center of my display.

Wish I could ignore mouse movement when the app switcher is displayed.

reply
probabletrain 3 hours ago
I use https://rectangleapp.com/ and enjoy it. I have shortcuts to move windows to the left/right half of the screen, and cycle between monitors. This, combined with native cmd+tab and cmd+` is enough for me.
reply
airstrike 56 minutes ago
Aerospace with opt+key to go to that space, cmd+opt+key to send a window to that space, then just make a mental map of where everything is. I use mnemonics like always putting discord on workspace "D" so it becomes quite fast
reply
ubercore 3 hours ago
This doesn't answer your question, but Aerospace (tiling WM) has been good for me to not use spaces. I don't mind spaces in theory, but the slow animation, for whatever reason, just really irks me.
reply
reaperducer 27 minutes ago
What do people use for Windows-like window management on macos? I tried a bunch of them and I'm not a fan of any of them.

I actively dislike the notion of spaces.

What do people assume Spaces is a Windows thing? It was on Unix systems decades ago.

reply
fellowniusmonk 2 hours ago
I use the r+cmd app for deterministic app switching.

Caps mapped to right command.

Karabiner to map dual-cmd+jkl; to mapped vertical slice so j is left quarter, j+k is left side, etc.

dual-cmd+i moves windows between screens and dual-cmd+u rotates current window through full, top half, bottom half.

The whole thing is deterministic and super fast and gives me more permutations than I'll ever need.

reply
guessmyname 2 hours ago
Every [*] macOS user uses Rectangle.app — https://rectangleapp.com

The ones who don't use it is because they don’t know it exists.

Or they are still using the (deprecated) Spectacle.app — https://github.com/eczarny/spectacle

[*] if you wonder why I say “every user” even though it’s obviously not true is because everyone loves hyperbole in this website.

reply
cloudfudge 2 hours ago
I can prove everyone doesn't love hyberbole because I have found a counterexample, but I cannot prove everyone doesn't use Rectangle.app.
reply
tomi_dev 2 hours ago
Curious — what was the hardest part to get right here? Was it performance or handling edge cases?
reply
user3939382 40 minutes ago
I’ve used TotalSpaces for this in the past, though Apple has essentially ruined the ability to make these tools successful with their SIP bullshit
reply
hk1337 2 hours ago
meh, i like the animation. I normally use it with the trackpad so the swiping back and forth makes it feel more natural if there's animation.
reply
j0r0b0 38 minutes ago
[dead]
reply