Before Yabai I was using Amethyst, but like your experience with Yabai, I felt like it would suddenly stop working and needed to be restarted. Maybe your experience would be flipped.
Switching to asahilinux was a *far* better solution. Not really sure what the use of macOS for me is when asahi exists now.
[1] https://github.com/kasper/phoenix
[2] https://github.com/nik3daz/spin2win
That said, it seems there are no perfect solutions. At work where I can't really be futzing around with window management config I basically just use Raycast + hotkeys and try to keep everything inside maximized application windows. This means using Arc browser (tabbed), iTerm (tabbed), VS Code (with native tabs), etc mapped to cmd+1, cmd+2, cmd+3...Not much "tiling" going on but at least everything is pretty keyboard friendly.
It’s fewer bells and whistles out of the box, but it works well.
Hello, AeroSpace author speaking :)
I'd be happy if you could try AeroSpace (it's and i3-like window manager for macOS) and report me back if it loses track of windows.
https://github.com/nikitabobko/AeroSpace
The architecture of AeroSpace is that on every user input that may change window configuration (new window created, window moved, window resized, new app launched, etc), AeroSpace runs the same idempotent operation (I call it "refresh session") that tries to detect new window, checks all invariants, re-layouts windows, etc.
The "refresh session" performs all the mentioned steps regardless of the user input nature (it doesn't matter whether the window is moved, or a new app is launched)
I believe that this architecture may lose windows only if the macOS API returns invalid data.
I have been using AeroSpace for quite a while myself and I'm happy with it
I've been using i3 for over a decade now and hate using any computer that doesn't have it, been trying to find a suitable substitute for my work mac for ages. Amethyst, rectangle, magnet, yabai, each had its own problems. The virtual workspace idea is genius and solves some of the biggest issues with those alternatives. This is by far the closest thing to i3 on mac I've seen. Thank you so much for making this.
My suggestion: open up a way to take donations to the project, and/or sell a packaged version on the mac app store. I'd be happy to pay good money for this.
```
hs.window.animationDuration = 0.2 spoon.MiroWindowsManager:bindHotkeys({ up = {hyper, "up"}, right = {hyper, "right"}, down = {hyper, "down"}, left = {hyper, "left"}, fullscreen = {hyper, "f"} })
```
Works well enough for years.
for window arrangement the hs.grid component is plenty for me. see an example: https://www.youtube.com/watch?v=nRJ0477KFp8
If I ever have to go back, it'll be one of the first things I install again.
https://github.com/peterklijn/hammerspoon-shiftit
My config file:
https://gist.github.com/pazimzadeh/b1c70f5f205d0b63264e7c021...
It does not make sense to me to use a "normal" tilling wm that automatically messes up windows' dimensions without asking me
I just need the windows to be automatically put side by side:
It takes a little while to get used it, but Yabai is now an app I can't live without.
1: launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"
# Reload yabai ctrl + shift + alt -r : launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"
Fleshing my concept out on a whim (since I am surprised I can't find another reference to this idea online!) with the help of ChatGPT (yes, it can do this now!), it looks like this equation would capture this concept:
U(r)=Umax ⋅e^(−k(100−r)^n)
where the total perceived Utility of a product/service/trusted person, given r=reliability percent (out of 100), is the maximum Utility times e to the (-k(100-r)^n), where k and n are tweakable based on the given product/service/person but which I want to assign values of 0.03 and 1.5 to, respectively, after plotting it.
Useful concept, that's exactly it.
Yabai used to be pretty solid and usable, but I think with the author not using a Mac for his daily and with all the updates to the OS that he has to keep track of (and how some windowing Mac api are still blackboxed or not reliant to build logic atop of) it's only a matter of time before it gets into a poorer state.
This is what I used for years. Sadly I'm back in Windows land these days due to work.
https://github.com/imawizard/MiguruWM
The wiki also contains a list of other window managers for Windows one might want to check out.
https://apple.stackexchange.com/questions/434555/can-you-com...
Native keyboard shortcuts are there for all to use to switch desktops, but the fading in/out animations that last around 1s completely prevent fast desktop switches as is so useful in i3/sway.
AeroSpace reimplements workspaces by emulating them. https://github.com/nikitabobko/AeroSpace/blob/main/docs/guid...
The result is that workspace switching is instant, and disabling SIP is not required
Note: I'm the author of AeroSpace
Either make the transition instant, or bring back the old behavior where the dock and desktop remain static during the slide animation.
Killer feature for me (apart from windows automatically being resized to fit, which is great), is ctrl+i to switch to screen i, and ctrl+shift+i to move the current window to screen i. I tend to have 2 windows max per screen, and use Yabai to flit between screens / flit windows to different screens.
(I used i3 on Linux prior to setting up Yabai, and configured shortcuts to be similar to i3.)
I think the key here is to use multiple desktops (or are they called workspaces?). If I'm working on a single screen I constantly have 10 desktops open, with a quite consistent setup between them (e.g. first desktop is fullscreen browser, second screen is 3-5 tiled terminals, ...). All the applications I'm "actively" using are usually on the first 2-4 desktops with a lot of screen real estate for each of them.
What really helps here is assigning one of the screen corners as a hot corner that goes to Expose mode where you can switch between screens, as well as assigning shortcuts for switching between desktops and moving windows between them (the moving windows shortcuts are usually part of your window manager). Selecting "Reduced Motion" in the accessibility settings also helps by speeding up the desktop switching animations.
I would love a tiling manager that allowed you to "full screen" the app into the tile of your choice.
By that, I mean the app would snap to the edges and lose all the chrome that is normal present. So your browser window, for instance, would lose the borders and url bar until you moused to the top of the tile.
it was perfect for using a single monitor
kinda like a deterministic alt+tab, you set up the layout of "workspaces" and they're always in the same place
you can also pin windows to always open in the same place, so you basically can have persistent layouts that you create while using them (not like powertools where you have to set up the layouts to use them later)
I keep getting annoyed at alt+tab because I accidentally clicked on another window and now the order is messed up
It was _so_ much better than just a 1D list of workspaces. I could get to any of my main 5 spaces with 1-2 key presses max. I've completely ignored spaces since they took that away especially since I think it reorders them automatically or something like that? I have zero desire for "smart spaces" or anything like that. I want deterministic. Now I just run multiple monitors and I'm happy with that but I miss the 2D grid for spaces on just a laptop.
I could see tiling working if I lived in minimal-chrome apps like Terminal and Sublime, but I don’t, and so floating with occasional tiling works better for me.
My experience is that they are also just productivity theater. You feel more productive with the snazzy shortcuts but its very rare for the bottleneck in a workflow to be window management. Most people probably lose more time overall managing their config files and looking up the shortcuts they forgot.
Yabai also makes working with a 15" display much more productive imho. For example, I can effortlessly and nearly instantaneously switch between browser and coding spaces by pressing hyper + w / hyper + c (I'm using Karabiner Elements to map capslock to hyper).
Since it's a common misconception, you do NOT need to disable SIP if you don't care about some features (noticeably, disabling those nasty space switch animations). For an overview of features that require SIP to be partially disabled:
https://github.com/koekeishiya/yabai/issues/1863
Also in general, the wiki on GitHub is very well-written.
Here it is being used in one context at a beatbox battle between then World Beatbox champion Alexinho and the super innovative Soso. https://youtu.be/OjbYK4rujB0?si=SIn-uNHlh2KexsXc Yabai shout is at 3m23s
I am sad though that you lose a good chunk of functionality without disabling SIP, which isn’t allowed for work devices
I moved over from macOS to Windows and WSL full time back in 2020 and eventually ended up writing my own tiling window manager for Windows, which I never would have done had I not had the experience of using yabai on macOS.
I don't think it's a exaggeration to say that my experience with this one piece of software completely changed my trajectory as a software developer for the better.
I’ve seen a few comments mention it here and there, but I’m swooping in with my semi-regular reminder that you don’t need to disable SIP to use yabai. It’s a great bsp window manager out of the box, with some optional—and admittedly very cool—extra features that require maneuvering around SIP.
(Also, minor apology to Amethyst users because I haven’t managed to get much time to work on it recently.)
And whatever app I need to use should ideally be straight in front of me. But that's just me, maybe I haven't had a proper tiling experience yet and thus I haven't seen the light.
I don't like visual clutter. If I'm using a program, I want it to be the only thing on my monitor. But sometimes I want to keep more than one program open, or even be switching between them. Tiling window managers let me give each program its own full screen, and quickly switch between them with a keyboard command. I love it.
And then there's the exception that proves the rule: Sometimes I do want to have two programs on the same screen, side-by-side. An example would be Vim in the left 2/3rds of my screen (where I am programming), and then a browser with some documentation on the right 1/3rd. Obviously tiling managers also support this case, and I prefer them here too vs. mousing around windows into place (which still tends to leave behind windowing chrome and other visual clutter).
That reminds me of another reason: I prefer keyboard to mouse. I've learned good form and technique for keyboard use, which let me use it frequently and for long periods while avoiding injury. But I just can't figure out a way to use a mouse or trackpad that isn't harmful, were it repeated enough (a vertical mouse goes a long way though).
Tiling managers let me do everything using keyboard (unless the "tiled" programs themselves require mouse), whereas traditional windowing managers pretty much require mouse. I find it both more ergonomic and much faster using the keyboard.
Amethyst does a decent job at the layouts I care about.
I primarily use AwesomeWM in linux on my personal computers which has the amazing super key drag/resizing behavior for windows. I use Hammerspoon to replicate this behavior[0][1] and it works quite well.
Eventually I want to replace Amethyst and just do everything in Hammerspoon as it seems quite plausible to do window layouting with it. Will give Yabai a try as well in the meantime.
[0]: https://github.com/RingOfStorms/setup/blob/master/home/confi... [1]: https://share.joshuabell.link/ezgif-1-ef0d3e0728.gif
The one other tip I have is to have an easy hotkey for toggling full screen mode. Toggling an app into full screen mode doesn’t lose its tiled position or create a new desktop the way native Mac full screen mode does, which is especially helpful when working on a smaller monitor.
Full config: https://github.com/twpayne/dotfiles/blob/21d0edcebaeebf0d90e...
https://learn-hammerspoon-0x8080.netlify.app/
I have a chapter on window management as part of the guide.
I could see that yabai could be a solution but haven't committed to a proper setup.
Anyone else using a single large monitor? FancyZones on Windows (PowerToys feature) looks pretty good, but I got sick of autoupdate BS random driver breaks (common linux thing) and went full mac.
My custom grid for 4K 43" snap zones in case anyone's interested: - diagram: https://imgur.com/a/axTw1tI - 3840x2160 1:1 grid: https://imgur.com/a/pUSoafG
But in Linux the choose-your-own-adventure that is the pluggable desktop model is that something like sway or i3 or other tiling window manager or a plugin for Gnome for example is much more in line with how the system was meant to be used and is very much not trying to shoehorn something in if any of that makes sense.
Of course the dev(s) that put this together and it's other projects are hackers in the truest form and their efforts are to be applauded. I'll continue to show them praise but keep using i3/sway on Linux for the time being. (funny enough tiling window managers was why I left MacOS for Linux.)
I have one hotkey I hit to put all my windows where I want them (aware of which setup I'm plugged into, home, laptop-only, remote office) on various monitors and then I have hotkeys to arrange/resize/move my windows around.
The best part is if there is something I want to do I can just add it (add a modifier or a new hotkey combo). After having that freedom it's hard to consider using anything off-the-shelf even though many of them are quite good from what I can tell.
Jokes aside, I love Slate's programmability. I configured mine to behave like WinSplit Revolution, since that's what I was used to.
Are you a fan of hobos?
This past week I've come up with what is I think my perfect, dream solution:
- Caps Lock is tapped for Escape, held for Cmd+Ctrl+Opt (i.e. "Hyper" or whatever). I'm a Neovim user, so Caps Lock has been mapped to Escape forever already.
- Tapping both Shift keys simultaneously engages Caps Lock for the rare times in which I actually need it.
- Window snapping is handled entirely with Hammerspoon. I have commands for absolute positions (e.g. half, one third, two thirds, quarters), but also can define grids and call them with key commands, and then use another command to snap all windows or just the focused window to the nearest grid box.
It's all defined with code, and thus lives with my dotfiles, and is just a `brew install` and symlink away from totally setting up on a brand new machine.
Also, I set my tmux prefix to Control+p, which I map to Command in my iTerm profile. So, opening up a new tmux "window" (i.e. tab) is Command+t. Navigating to the next "window"/tab is Control+Tab. And so on. Basically it just feels like a browser. This way, whether I switch terminals, or am ssh-ing into a machine, as long as I have my tmux config, those key commands are set.
It's an amazing setup, can't recommend it enough.
I'd pay real actual money, as I suspect would many others.
I hope one works out!
No joy with the rest.
That latter case would be supercharged if Finder supported this on macOS as the global text edit bindings are more ergonomic for me than those shared between Windows and Linux.
Rectangle is another oss option: https://github.com/rxhanson/Rectangle
I bought Moom long before rectangle came out, both are pretty decent.
I did try Yabai and Amethyst for a bit, but the overhead was a bit too much to handle.
What am I missing?
I find XMonad is most effective for me. I sometimes also use i3wm (and there's also Sway, for Wayland). There are a few others.
I'm looking for something that shows all windows for an app, per app, and maybe doesn't switch the app to finder when you cancel the cmd-tab
I think I saw this in popOS. Does yabai support this?
I don't remember it but something like separate spaces for displays.
(I have done quite a bit of research and testing on these, and keep using a mixture of Moom and Phoenix - here's my full list: https://taoofmac.com/space/apps/window_managers )
Seems like SIP is only needed for system dialogs etc so has the same limitations as Amethyst
But I can never remember the name of the app because it's just ctr-opt-cmd-left in my head.
[0]: https://github.com/koekeishiya/yabai/wiki/Disabling-System-I...
It's called skhd https://github.com/koekeishiya/skhd
I forgot where the script for the stacking is. I can look that up separately, but I'm on mobile atm.
I find that I only need tiling occasionally, and for that Moom excels since it doesn’t add any new key shortcuts to memorize and is only ever visibly present when hovering your cursor over a window’s green button. Its Aero Snap equivalent is optional and turned off by default too, which is great for me (I trigger Aero Snap’s proposed-window-resize animations unintentionally often enough that they get to be irritating).
And the name of Yabai -- which translates to "danger" -- never sounded appealing to me to introduce into my device.
I might have to grab the Pro version because they really deserve the support.
I like it so much that I wish I had the same muscle-memory for similar shortcuts on Windows (I believe PowerToys FancyZones can be set up to snap a window to a given zone or zones with hotkeys, but it's not something I've dug into yet).
But I don't use a mac anymore. I use linux desktops and there's just nothing quite like Rectangle. For a long while, I used a tweaked fork of pygrid. These days I use wayland compositors and don't have a good option. I've been meaning to hack something together to work with floating windows on Hyprland but I never get around to it.
Someday I'd like to write something that does placement and sizing like Rectangle but snaps adjacent window edges together. Like if I have a bottom left window that's 1/3rd screen width and assign a new window to bottom right 1/3rd width, the bottom left would get resized to 2/3rd wide to fill the void. If I place a new window at bottom middle 1/3rd, the bottom left would get resized back to 1/3rd. If I resized bottom middle to 1/2 width, then the bottom left and right would each be resized to 1/4 width.
Hyprland has a plugin system that I believe would let me do this (someone has created an i3-like tiling plugin) but I don't have the skills or motivation to learn c++.
I haven't tried it, but the tradeoffs don't sound great to me. Only allowing multiple modifier keys avoids all of these timing issues. You seem to be comfortable with it, but I think most users would trigger a lot of spurious inputs.
I like to have margins between my windows, so almost all window tiling / snapping managers just make me feel cramped.
"Customize your workspace - set a gap around the window edge between 0px to 128px."
Discovered the setting this week, my desktop looks so aesthetic now.
This is not a requirement for yabai.