Native Instant Space Switching on macOS

3 hours ago (arhan.sh)

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

  • This is such an insane bug to still have around all these years.

    Are apple engineers not using macOS?

    • I think Apple's self-image of being the epitome of design actually acts against them. Leads to monstrosities like Liquid Glass kinda vandalizing random parts of the UI in small ways that I intuitively read as "they are anti-anti-aliasing" not "they added cool refraction effects." It used to be you'd see something in a well-chosen color, now it is just a muddy kind of greyish brownish whatever.

      I'd like to see them make some costly signalling to indicate that they are going to turn it around like maybe buy two Superbowl ads in a row and let the CEO make a personal apology.

      Isn't going to happen because the competition is Microsoft and Intel and Dell who won't hold them accountable and it is just too easy to turn reject iPhone chips into netbooks in 2026.

    • I mean, their damn phone keyboards are so bad I'm 100% confident that Tim only does voice to text on his phone. There's no way that the CEO of a company could use a keyboard that horrible and not want to fix it.

      3 replies →

    • I wouldn't be surprised. Their 3D solid modeling is done on Windows, so why not their electronics.

  • 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

Apparently the "natural scrolling" option also reverses the swipe gestures for space switching, haha

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

  • Another happy aerospace here! IMO it does a great job with barely any configuration required (the default config works great, I have barely tweaked it over years of use), that said I’m not exactly power user of tiling WMs, I have one app per workspace 90% of the time

    • Same here. My only complaint is I wish there was a way to make apps floating by default and then you would specify which ones you want tiled.

      IME a lot of apps are easier to use in their default state. I really only use my web browser, text editor, and terminal in tiled mode.

  • 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).

God damnit I didn't know until 15 seconds ago that the Space-switching animation in macOS was annoying. Thanks a lot!

  • 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!

Stop using MacOS spaces. Never full screen anything. Throw everything around with hotkeys using OSS rectangle. Use shortcat to automatically bring your cursor to anything on your screen and use enter to click and type.

  • You don’t get it

    Spaces are not for fullscreen but for basically virtual desktops i3 linux style

    Here is superior user experience:

    1. Install moom. Its keyboard windows arrangement is second to none. Its two-step tiling is a killer. Ie caps-a to show a popup with all the shortcuts, then “a” letter for vertical 1/3 of the screen. Or s for middle 2/3. Or q for top left third — you can assign any letter for any portion of the screen.

    2. Use option1-6 to switch between desktops

    3. For example alt-4 is a desktop where you have all on one screen (suppose you have 6k xdr like i do): safari, mail, messages, telegram, hey email, reeder

    alt-3 is your productivity desktop where you have things, calendar, basecamp, notes, ia writer

    alt-1 and 2 is for your main work like rider ide or what have you

    Alt-5 for your remote stuff like remote desktop, servers, what have you

    So with this you have a mental model of where everything is always and instant switching to it. Want to see your todos and notes? Alt-3. Want to see your browser and messaging? Alt-4. You get it.

    Moom is better than tiling manager for screens like 6k 32” xdr.

    Otherwise tiling managers are perfectly fine. For instance on windows I use komorebi

  • Similar I just use RayCast Hotkeys to bring mostly full-sized apps of my choice to the forefront and not worry about much. I'm also just optimizing around a small single screen setup these days for focusing on stuff.

    option-cmd-o BOOM, outlook opt-cmd-g Bang, Ghostty opt-cmd-v POW, VSCode opt-cmd-s Boff, Slack etc etc...

    ALSO: I learned this from some prior thread on something similar.

  • Yeah well, I'd like to see your face when you find out that each time you fire shortcat it makes one HTTP request, yikes.

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.

Having been ruined by Linux options like Hyperland and Niri, I’m digging my early foray into OmniWM - https://github.com/BarutSRB/OmniWM

  • As someone who never uses spaces or any window manager, what am I actually missing? What’s wrong with cmd tab and just switching between apps? Is this going to be some Kind of major epiphany?!

  • 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.

I use spaces constantly, and I’ve never thought about the animation - I don’t think I’d ever noticed it to be honest. So it’s really interesting to read all the comments here about how frustrated people are with it. This is not a defence of it just genuine interest - I bet there are totally different parts of the OS that bother me that don’t bother others also.

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.

  • 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

    • 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.

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!

  • Hey, author here, and cool project! I spent some time comparing Yabai's scripting addition to InstantSpaces' scripting addition. They seem to be doing the exact same thing, but Yabai works while InstantSpaces doesn't, and I eventually gave up trying to figure out why.

    Regardless, I still prefer InstantSpaceSwitcher because its implementation is simpler and it doesn't require disabling SIP. If you can get it working, however, I can edit my blog post to say so!

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.

  • if youre using a firefox based browser, slow fullscreen for media can be fixed by setting the full-screen-api.macos-native-full-screen flag to false in about:config

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.

  • 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.

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.

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.

  • 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?

    • 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.

The giga brain move is to stop using MacOS spaces. Never full screen anything. Use an OSS window management tool like `rectangle` (similar to deprecated `spectacles`).

Use shortcat to bring your cursor to any element with just typing.

Genuine question - why do people even use spaces? Why is it better than just CMD+Tab or CMD+Tilde until you arrive at the window you want?

  • Because it makes you have to think before moving. If I am on Chrome and want to go to my code editor, I have to press CMD+Tab, see what position the code editor is in and press CMD+Tab x times to go there.

    If I uses spaces, I know exactly where my editor is, where my browser is, it is one key press away and it is always there. I use aerospace and I divide my spaces using Alt+ the qwerty keys. Q=chrome W=code editor E&R=programs open for what I am working aka Postman or Obsidian and T=MS Teams.

    My dock on MacOS is always hidden because I don't need it and now I have more screen realestate.

  • I can organize related windows by task, so if I have two things going on which both involve say a Finder window, a Safari window, and some other assorted things, I can switch between tasks as a group with one gesture instead of cmd-tab which will pull up both Safari windows or both Finder windows, and then maybe needing to cmd=` to switch to the correct one.

    When I'm in the appropriate space with only those related windows, the exposé gestures are also much more usable than when everything is jumbled together.

  • For me, I use spaces constantly to help me organise/compartmentalise what I’m doing. It lets you group related windows, where command tab only brings you one window at a time.

    One example would be if I’m working on a document that draws on others I have written. Put all three in a space and that piece of work is nicely organised.

    When I have all my windows in one space I find it messy and stressful and it’s harder to find what I want.

    Overall spaces are more compatible with the way I think than command tab.

You know Apple lost it and have become what Jobs most hated when the instructions to suppress an obvious UX flaw in macOS read like a registry tweaking hack for some atrocious UX in Windows, ca 2005.

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.

  • 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.

  • 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.

    • it just blends into the background for me personally, i found it annoying a little when i swapped from multiple monitors to one

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.

Honestly, this animation in one of the best things about spaces in macOS. I use the four finger gesture to switch spaces all the time and it make the spaces feature so much more natural than all other window managers I’ve used before

  • Agreed, that’s one of the things I miss most when using a Windows machine at work. Something about the animation makes my workspace feel bigger in a way that the Windows multiple desktop feature is just missing.

    Technically Windows does have an animation when switching desktops with the trackpad, but it’s so jittery that it’s annoying. And the desktop image takes seconds to update, and only updates after completing the animation. To me this is one of those “death by 1000 missing bits of attention to detail” problems that plagues Microsoft/Windows.

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.

  • Why not use a macOS i3-like window manager like yabai or komorebi (paid)?

    • 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.

      2 replies →

  • > 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.

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

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)).

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

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.

Works on my Intel mac running Sonoma 14.8.2. I use Omakub on my Linux machine and missed this when on my mac.

I wonder how this compares to Aerospace, which I use daily but ultimately has felt a bit janky and slow

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.

Can’t say that the sliding animation has ever been the bottleneck to my productivity.

  • 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.

  • Single monitor workflows — which are more ergonomic — make switching spaces a necessity. It might not impact productivity but it is annoying as hell switching around spaces a lot

This is beyond stupid for macbook using trackpad gestures.

I can understand for mouse/kbd input though.

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.

  • I'm a bit reluctant to draw attention to my solution since it was written to scratch my own itch and I have only had a handful of users other than myself. Last year I was seriously thinking about making linux my dev choice because coming back to a machine that had slept left me with several minutes of reorganizing the windows that had jumped to various spaces as the multiple monitors were recognized. Aerospace could put them consistently somewhere but it couldn't distinguish windows of same app. I built WinPin for that use case but then kept going to solve other things that have made using a Mac with multiple screens and dozens of windows that need to be organized around my workflows easier. I built in support for workspaces but really haven't used that myself since spaces were more of a necessary evil to organize windows rather than useful in themselves. Interestingly to make WinPin truly useful you have to turn off spaces because I can't figure out a way using what Apple gives me to determine which space a window is in.

    If anyone would like to try the app out (https://winpin.app) I'm pretty confident that downloads and update flow are working and it has been running without issue for me on multiple macs for the last 4 months. There are a lot of edge cases I'm sure I haven't seen yet, but it has truly changed my workflow and I'm interested to see what others think. Please don't try to purchase a key, it is fully functional without one. I'm still working on that with Polar.sh and want to make sure my t's are crossed and i's are dotted. Gotta be one of the weirder posts to HN since I actively do not want to sell you something right now.

  • 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.

  • 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.

  • 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.

  • 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

  • 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.

  • 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.

  • 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.

    • I can prove everyone doesn't love hyberbole because I have found a counterexample, but I cannot prove everyone doesn't use Rectangle.app.

A lifetime license for BetterTouchTool with ALL its features is $25. The time the author spent on this is well over that amount.

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.

Curious — what was the hardest part to get right here? Was it performance or handling edge cases?

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.

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