Native Instant Space Switching on macOS

arhan.sh

237 points by PaulHoule 4 hours ago


aylmao - 2 hours 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

xz18r - 3 hours 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

tptacek - 3 hours ago

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

Cider9986 - 2 hours 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

tnightengale - 2 hours ago

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.

revv00 - 5 minutes ago

Not a space user, command+tab solve most of my problem. But will give it a try.

Nevermark - 2 hours 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.

phren0logy - 3 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

cosmic_cheese - 3 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.

mrkpdl - an hour ago

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.

aequitas - 3 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.

modeless - 2 hours 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.

nicoburns - 3 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.

flawn - 2 hours 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!

benji-york - 3 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.

ivanjermakov - 35 minutes ago

Amazing how much effort is needed from a billion dollar company to make a feature present in my 1kLOC window manager.

traderj0e - 41 minutes ago

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

tnightengale - an hour ago

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.

Fraterkes - 4 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.

mintplant - 2 hours 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

ray__ - 4 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.

hmokiguess - 2 hours 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

nkzd - an hour ago

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?

al_borland - 2 hours 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.

gechr - 3 hours 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

rendx - 3 hours 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)).

gib444 - 16 minutes ago

I installed Debian stable + i3 + x11 on a desktop today - what a breath of fresh air (not that I'm new to Linux) compared to MacOS. No bloat. No animations. No lag. A perfect tiling WM.

No Secure Boot, no TPM, no SIP, no phoning home to the mothership to check if I'm allowed to launch an app, no spyware, no telemetry, no update nags, no trying to trick me into upgrading to the next major version.

I tried Sway & Wayland but IntelliJ freaked out so I went to x11

Also Nouveau seems pretty damn good these days.

KeepassXC works much better on Linux which is nice.

I'm keeping my M4 Macbook Air around for a while to play with local LLMs but it's not exactly the best for that, so I'll think it'll be on eBay not before long, because MacOS is getting more and more annoying...

zlies - an hour ago

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

KaiserPro - 2 hours 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

Aaronstotle - 2 hours 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.

toddmorey - 2 hours ago

> it works by simulating a trackpad swipe with a large amount of velocity

Damn, that's rather clever.

ralphc - 3 hours 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.

airstrike - 3 hours ago

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

rwc - 3 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.

isege - 2 hours ago

Christmas has come early! Thank you for sharing this

virtualritz - an hour ago

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.

houseofmvps - 2 hours ago

Great one. Thank you for sharing this.

walthamstow - 3 hours ago

I never run more than one space and instead switch between windows with the app Alt Tab

mixtureoftakes - 2 hours ago

this was SO annoying. thank you.

Truly baffling how apple haven't done this before

IOT_Apprentice - 2 hours ago

BetterTouchTool is $25 for a lifetime license with upgrades.

throwatdem12311 - 3 hours ago

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

adamnemecek - 4 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.

theultdev - 2 hours ago

This is beyond stupid for macbook using trackpad gestures.

I can understand for mouse/kbd input though.

jiehong - 3 hours ago

Outstanding!

IOT_Apprentice - 2 hours ago

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

veber-alex - 2 hours 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.

tomi_dev - 3 hours ago

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

hk1337 - 3 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.

user3939382 - 2 hours 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

j0r0b0 - 2 hours ago

[dead]