-
-
Notifications
You must be signed in to change notification settings - Fork 655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove cmd+tab space switch animation #1235
Comments
I would contribute $ for this. That animation annoys me very time. There's an alternate task switcher called Alt-Tab, if it issued |
The macOS I have been thinking about trying to make a better window switcher myself, and have a couple of thoughts, but never felt like getting started. The window switcher is also a part of Dock.app, so it might be possible to work around the animation by patching the code through the scripting-addition, but I have not investigated this part. |
The most recent window should be obtainable through the |
So AltTab shows the index of the destination space in the switcher popup. If it just issued |
Thanks! That's the command I want. Strictly implementing recent_space=`yabai -m query --windows --window recent | jq '.space'` && recent_window=`yabai -m query --windows --window recent | jq '.id'` && yabai -m space --focus "${recent_space}" && yabai -m window --focus "${recent_window}" |
For what it's worth, TotalSpaces v2.99 is able to remove the animation for cmd+tab (working on Big Sur 11.6.1), although I am not sure exactly what they do to achieve that, but it is at least possible at a technical level. |
Spent some time investigating this and got a working POC on Big Sur 11.6.1 (Intel). Will look into Monterey (and also Apple Silicon) later. |
Hm not sure how doable this is for Apple Silicon. It loads an immediate value directly into a SIMD register (that is then used for the animation duration), instead of loading the value out of memory like in the x64 version. To make this change we need to patch that instruction, but for some reason it won't let me make that region of memory writable. Edit: And shortly after making this comment, I got it working. |
Short summary; these changes removes:
This is still a work in progress, meaning that not all OS versions are supported yet. I have currently tested and verified that this is working on macOS Big Sur 11.6.1 (Intel), but believe it should also work on Monterey 12.3.1 (Intel). I have also verified and tested that it works on macOS Monterey 12.3.1 (Apple Silicon). |
Should now be working on the following systems: Intel: macOS Mojave, Catalina, Big Sur, and Monterey. Apple Silicon: macOS Monterey. |
This is pretty amazing! It allows using Out of curiosity, does this delay removal rely on scripting additions being loaded? |
Yep. To achieve this I basically patch the load instruction that would fill in the animation value, to load a zero instead of whatever value they use (0.25 I think it was). |
I'm using macOS Monterey (intel), I confirm that the animation is completely gone. Thanks for the amazing work, that's really helpful! |
I just installed --HEAD on 12.3.1 on Apple Silicon and the animation is gone! Thank you! Maybe I'm doing something wrong but |
Can you post a gif or something with your window layout that produces this issue? I have tried to reproduce it, but am unable to. I do believe there could be an issue here on the master branch, as I did some changes #1220 |
I just reverted back to the regular homebrew package and the issue is gone. I can reinstall --HEAD later if you need me to. You can reproduce by creating two terminal windows, east and west. Select the east-most window and run |
I've tried exactly that, but it works correctly for me. See this gif: Screenshot of the end-frame with full resolution for readability: This was tested with the latest commit (7e9b09b) |
Ok I reinstalled HEAD and I changed |
Probably just a silly off-by-one error. Will look at it later. Thanks for testing. |
@restfuladi Should be fixed now on the latest master. |
a tool that i've enjoyed as an alt to normal cmd+tab is https://contexts.co but it doesn't seem to play nice eventually... |
I just wanted to mention #1501 which I just opened, since I actually prefer the |
@koekeishiya If the only thing that I want from |
You only need the yabai scripting addition to load into Dock.app for the space switch animations (that are listed in my previous comments in this issue) to be removed. Yabai itself does not need to be running. The scripting addition is the extension that requires SIP to be disabled. |
First of all, thanks for creating such an amazing app! I've been using
i3wm
on Linux for a long time, and I cannot believe I just found a window management app on macOS too!Currently, I've configured 10 spaces, and I use
skhd
andyabai
to switch to different spaces with shortcuts. The really good thing is,yabai
disables the space-switching animation by default. That's really great. For someone who constantly switches between spaces, the animation is really annoying.There's just one thing left: If I use
cmd + tab
to switch between apps located in different spaces, macOS still shows the animation for me. I'm wondering if I can useyabai
to reimplement the functionality ofcmd + tab
and useskhd
to map the shortcut. That way the animation would go away too. But I cannot. I cannot find the previously focused window inyabai
, which is crucial to this functionality. Maybe I missed something. Is it achievable?The text was updated successfully, but these errors were encountered: