What does HackerNews think of yabai?

A tiling window manager for macOS based on binary space partitioning

Language: C

SIP is a feature that protects you from malicious actors with root (admin) access on your device. After they've encrypted your photos and drives and changed your passwords, it prevents them from making your machine unbootable by deleting or altering system binaries. As a side effect of this protection, you give up certain freedoms to customize your system.

https://github.com/koekeishiya/yabai

For instance requires SIP to be disabled.

This is disproven by the fact that Yabai [1] can instantly swap spaces with SIP disabled.

[1] https://github.com/koekeishiya/yabai

I feel the same way. I would much prefer no animation at all, and an instant transition between spaces.

Apparently this is possible with yabai (https://github.com/koekeishiya/yabai), but it requires disabling system integrity protection which I am personally uncomfortable with.

If you install yabai (https://github.com/koekeishiya/yabai) it has a feature that can completely disable spaces switching animations - but it does require partially disabling SIP (worth it for yabai, IMO).
Not exactly what you're looking for in terms for scrolling, but this allows resizing multiple windows:

https://github.com/koekeishiya/yabai

Yabai[1] looks like it supports directional focus movement.[2]

You could also check out hammerspoon[3] and see if there are any sample configurations that could do directional focus.[4]

[1]: https://github.com/koekeishiya/yabai

[2]: https://github.com/koekeishiya/yabai/wiki/Commands#focus-win...

[3]: https://github.com/Hammerspoon/hammerspoon

[4]: https://github.com/Hammerspoon/hammerspoon/wiki/Sample-Confi...

IIRC You can get rid of the switch delay using Yabai[1] but you will need to disable SIP which may be a no go if you have work assigned MacBook

[1] https://github.com/koekeishiya/yabai

> Envious since I probably can't replicate all of your features on MacOS.

Don't raise on click: if you can remember to cmd-click, this mostly works, even with right-clicking. The window receives the click and doesn't raise.

Point to focus: you can get this with yabai [0]; note that it recommends disabling SIP (and keeping it disabled) so that it can install some hooks into Dock.app, but you don't need to do that if you only want focus-follows-mouse.

select/single-click paste: you can get pretty far with hammerspoon (hs.eventtap to notice mouse drags, double-, and triple-clicks, and then use hs.uielement to get the text that is selected), but it's handicapped by apps that don't play nicely with accessibility (browsers and electron apps in particular come to mind). [1] has an alternate way which notices selections as above and then uses hs.eventtap to send synthetic cmd-c keydown/keyup events, but I haven't tried it.

edit: now that I think about it, I think you might be able to do the don't-raise-on-click behavior with hammerspoon as well, by capturing click events, checking their `mouseEventWindowUnderMousePointer` property (see [2]), and if that is not the window that is currently focused, block that event and send a synthetic copy with cmd- added (and if cmd- is already in the mod mask, treat it as "I want to raise that window" and do the opposite -- block the event, copy it and remove the cmd- modifier, and post that synthetic event)

[0] https://github.com/koekeishiya/yabai [1] https://github.com/Hammerspoon/hammerspoon/issues/2196#issue... [2] https://www.hammerspoon.org/docs/hs.eventtap.event.html#prop...

I don't have any link on hand right now for a writeup, but I've followed yabai's (https://github.com/koekeishiya/yabai) development closely ever since it was called kwm and saw the limitations of macOS's public API to managing windows.

The windows with this parent process go here thing can be solved easily, and can even be done as a one-liner with yabai. Example of moving all the windows of Sublime Text to display 2:

    yabai -m query --windows | jq '.[] | select(.app == "Sublime Text") | .id' | xargs -I '{}' -- yabai -m window '{}' --display 2
It can even be automated by adding a rule in ~/.yabairc (although that might be undesirable as it will always be enforced even if you want to move the window manually):

    yabai -m rule --add app="Sublime Text" label="sublime-display-2" display=2
Yabai can also resize the window to whatever size you want, or move it to a specific space, and it can even do that based on the window title.

It has this much power because it uses macOS's private APIs from SkyLight.framework (the macOS window and display manager): https://github.com/koekeishiya/yabai/blob/master/src/misc/ex...

Woah, such a coincidence, I've been trying yabai[1] on my macOS mini for the past few days.

I wonder how they compare?

Installing yabai involves some fishy tinkering with system integrity protection and giving screen recording permission for some functionalities, which doesn't bother me while at my personal PC but is kinda troublesome for a work machine.

Also, does it include some sort of workspace style virtual monitors? Like i3 does for linux.

In this case I would love if it allowed me to load custom workspaces on boot, which is such a pain to get working on i3[2]. (I'm not sure if yabai handles workspaces).

1. https://github.com/koekeishiya/yabai 2.https://wiki.archlinux.org/title/I3 section 5.3.2 for example

I have the animations off entirely, be warned though, it requires disabling SIP which is a non starter for many corporate environments.

If you install yabai[0] with its scripting addition, you can configure hotkeys to change spaces with no animations. It's pretty powerful, and I have specific keybinds[1] to do things such as transition to a space with a specific application running.

[0]: https://github.com/koekeishiya/yabai

[1]: https://github.com/worm-emoji/dotfiles/blob/140c9fd614ebfc54...

Yabai (https://github.com/koekeishiya/yabai) with SIP disabled is the only way to do that nowadays.

I personally gave up on Spaces completely because of this. Now I just have everything on a single space, and move through apps instantly using my rcmd app (https://lowtechguys.com/rcmd)

Just a note that there's a whole app called rcmd for switching apps using the Right Command key: https://lowtechguys.com/rcmd

I'm the developer and have the same exact use case: viewing one window at a time on a single space, instantly switching between them.

I used to map those hotkeys manually using Karabiner, skhd or BTT before, but I figured a semi-dynamic tool might fit this better.

Another thing that's useful for me is using yabai (https://github.com/koekeishiya/yabai) with its Stack layout, which automatically maximizes any window (with or without padding if you want)

Basically:

    brew install yabai
Then add this in ~/.yabairc

    yabai -m config layout        stack
Then start yabai and add it to launch automatically at login:

    brew services start yabai
I feel I've regained some sanity with https://github.com/koekeishiya/yabai - even without messing with System Integrity Protection. It's a shame there's no real Api to enable proper screen/desktop/wm on macos though.
Yep! That option works well for some people but personally I find it takes a bit too much "feel" away.

There are other options like making some animation speeds faster (so fast that the animation is almost imperceptible) and disabling some animations in Finder. The Cocktail utility can do it, and it can be done from the terminal too.

I'm not 100% sure this is up to date, but it might be: https://osxdaily.com/2015/01/06/make-the-window-resizing-ani...

The main one is basically like this:

  defaults write -g NSWindowResizeTime -float 0.003
Plus there are some more similar things you can set in `defaults`. (What the Cocktail utility is is a GUI that captures knowledge about a bunch of these settings into a convenient tool. There are other utilities like this afaik? BetterTouchTool maybe? idk.)

Then there's something called yabai which is a 'window management utility', but afaik it goes a lot deeper than other similar programs for macOS - it can disable animations and do some more stuff up to the point that you need to (partially) disable SIP to be able to make full use of it. Haven't tried but it does seems to be very worthwhile. https://github.com/koekeishiya/yabai

Yep, under Accessibility => Display => Toggle the Reduce motion button. It is much better but still not instant. The only way I'm aware of how to make it instantaneous is by disabling SIP and using Yabai [1].

[1] https://github.com/koekeishiya/yabai

Indeed, power users are not really what Apple optimizes for. They try to dumb everything down, and it helps them in their ultimate goal: get more market share.

You've actually stumbled upon the least configurable components of macOS: the Window Manager, and the Desktop Environment.

On Linux you can choose your own, and you have so many different paradigms. I still miss i3 wm..

On macOS you don't have this choice, and you have to use apps to get to the workflow you need.

I was a Windows power user for a few years, and now I use both Linux and macOS daily since 6 years ago. In the end, I feel more productive on macOS nowadays, mostly because there are many quality apps to get anything I want done, I don't have to worry that basic OS function will stop working when I update some dependency, and there are some macOS-native features that really improved my workflow.

For example I didn't know how useful Live Text would be until the first time I noticed that Command-F search in Safari also searches text in images, or when I double clicked on a phone number and I could just call it with my iPhone (which was in another room) but keep talking from the MacBook.

I can't even imagine how I would do that on Linux (surely doable, but nothing beats "already done and usable"), and it's just one of many features like that.

I will end with some more software recommendations: yabai for window management (https://github.com/koekeishiya/yabai) and skhd for hotkeys (https://github.com/koekeishiya/skhd)

They are more Linux-like, using config files, free and easy to forget they aren't native.

You could try Yabai [1], but it's a bspwm clone not an i3 clone. Still not as zippy as the TWMs on linux, but a pretty decent experience overall. There's also Amethyst [2] which kind of replicates xmonad. In most ways they're worse than using the linux ones, though at least you retain the full features of Aqua and Quartz, while trying to integrate i3 or other TWMs with a proper DE in linux remains to be a hassle.

[1] https://github.com/koekeishiya/yabai

[2] https://ianyh.com/amethyst/

I'm surprised no one has mentioned https://github.com/koekeishiya/yabai -- it takes a little work to setup but it's well worth the effort. It's keyboard centric and auto lays out windows nicely.
Valid points in the article.

Slightly related: I feel it's worth spreading the word about yabai [1], a tiling window manager for MacOs. I've been using it for >1 year, to get an i3 like experience, and find that it makes using MacOs very pleasant.

Issues in the article are somewhat addressed:

> Focus Follow Mouse

Can do this with yabai

> Always on top windows

Can do this with yabai

> Window snapping

Can do this with yabai

The way I use it: I have 9 desktops, and can switch between them via the keyboard (ctrl+). Can move apps from one desktop to another via keyboard commands. Apps are automatically resized to fit. Can move apps around on screen via keyboard commands.

[1] https://github.com/koekeishiya/yabai

FFM is completely possible on macOS (unless you mean something completely different). I use yabai for it: https://github.com/koekeishiya/yabai
3 of the 4 items that the author mentioned can be solved with using NixOS inside a VM on your mac :)

Inspired by Mitchell Hashimoto's VMWare setup[0]. I setup my own computer in such a way, I now have the best of both worlds. Developing on a linux machine, where I can control everything if I wanted (down to the OS) and the ease of Notes/iMessages whenever I need it.

Window management is a pita because of internal APIs and the fact that Apple doesn't cater to people that actually care about these tools. Check out Yabai[1] which btw requires you to disable SIP (System Integrity Protection) if you want to use its full potential.

Instead you can run NixOS and choose your favourite window/tiling manager (i3).

Package manager: I still run Nix but I am not that happy with it. Either I need to spend some more time or look for an alternative. One of the problems is the ability to easily pin older versions.

[0] - https://www.youtube.com/watch?v=ubDMLoWz76U&t=359s&ab_channe... [1] - https://github.com/koekeishiya/yabai

I like that the author points out a number of great default shortcuts in macOS, but I find it hard to beat the combination of yabai[1] and skhd[2] for the best keyboard-driven workflow. In the absence of these, I would be more inclined to try either Hammerspoon or Karabiner-Elements. I also find Phoenix[3] intriguing, but it's probably too much work to get it to where I'd want it for daily use.

[1] https://github.com/koekeishiya/yabai

[2] https://github.com/koekeishiya/skhd

[3] https://github.com/kasper/phoenix

I would also suggest https://github.com/koekeishiya/skhd for hotkeys; it also pairs well with an associated project for window tiling and management: https://github.com/koekeishiya/yabai
A tiling window manager is one thing I still miss on MacOS from Linux. Back then I used ion3, I still think about it fondly.

I've been eyeing yabai [0] for a while. It requires system integrity protection to be disabled. I initially misread it as being fully disabled, but it turns out once whatever extensions are injected, protection can be reenabled. Excited to try it once it's got a Monterey version.

[0] https://github.com/koekeishiya/yabai

I used FreeBSD on desktop for a number of years and switched over to OSX and I've been through some of the window management pain. I generally do as much as I can with keyboard hotkeys but I do have a trackpad connected to my desktop now as well.

As far as window management, I use contexts for my switcher, rectangle for hotkey-based window management, and stay for automated per-app & per-display window management

https://contexts.co

https://rectangleapp.com

https://cordlessdog.com/stay

There's also alternate window managers for OSX such as Yabai or Amethyst

https://github.com/koekeishiya/yabai

https://github.com/ianyh/Amethyst

yabai - Tiling window manager https://github.com/koekeishiya/yabai

I use the basic feature set so it works well on my work laptop (no need to disable SIP).

I really tried to like macOS for an entire year. I used Yabai[1] as tilling window manager which is much better than Amethyst mentioned in the article. I also wrote my own compose key tool macos-compose[2] and rofi-like clone choosem[3] (eventually bought into Alfred).

Yet with all of this effort I still went back to linux after a year (Arch with Qtile and Gnome). What really killed macos for me was the fact that animations could not be disabled entirely and everything felt like it's behind several ms of a delay. I work on the move so I don't have the luxury of multi-screen setup so switching between programs, workspaces and windows is the most important part of my workflow - it just drove me nuts.

Now I run simple Lenovo yoga laptop with arch+qtile+gnome and honestly, my performance at work at least doubled. That's my anecdote anyway.

1 - https://github.com/koekeishiya/yabai

2 - https://github.com/Granitosaurus/macos-compose

3 - https://github.com/Granitosaurus/choosem

Another alternative is yobai (+ skhd) https://github.com/koekeishiya/yabai

I switched to it after having some issues with rectangle sending some of my windows into the abyss (way outside of the screen) which forced me to kill the app and restart it to get it back. But if Rectangle works for you that's good too, it's probably easier to configure.

You may find this osx tiler useful. These days I can't live without it and it's been stable for me for quite some time.

https://github.com/koekeishiya/yabai

If you're looking for a good OSX window manager, Yabai [1] is excellent. If you're willing and allowed too you can get greater control by disabling SIP. However even with system integrity enabled (which bars access to certain WindowServer APIs - space control, removing shadows, multi-monitor integrations) Yabai functions great.

It uses a messaging passing API to interface with a local service, so it's completely programmable and can be integrated with something like skhd [2]

1: https://github.com/koekeishiya/yabai

2: https://github.com/koekeishiya/skhd

My skhdrc setup: https://pastebin.com/5GT8yiGK

XMonad is the one thing I miss dearly from Linux since I had to switch to a Mac. With some effort, yabai [1] on Mac can approximate XMonad well enough (mainly, multiple workspaces, automatic tiling, focus follows mouse, and a few other key bits).

[1] https://github.com/koekeishiya/yabai/

These were all a bit limited for me. I've settled on yabai[1] (window manager) and SKHD[2] (hotkeys), cannot recommend it enough. [0] https://github.com/koekeishiya/yabai [1] https://github.com/koekeishiya/skhd
I went from using i3 on my personal Linux machine, to my macOS machine for work. I've had the same thoughts about switching back, but it wasn't an option. Amethyst pulled me through the worst. It can't compare to i3.

There's also this: https://github.com/koekeishiya/yabai, but I haven't tried it out because of the disclaimer: "You acknowledge that you understand the potential risk that may come from disabling arrow_upper_right System Integrity Protection on your system"

> I sometimes have 100+ editor, terminal, and browser windows. Linux has many window managers up to the task (i3, xmonad, openbox, and countless more). Mac has the default one which you CAN'T change.

This is so much my issue. I love i3wm, it's been a revolution for how I work. I never really understood the "desktop" concept with overlapping windows very much, and i3 works at an abstraction that is very close to how I imagine my desktop. I keep stacks of windows open in an arrangement that might be bizarre to anyone except me, but when I look at it it's 90% how I want it to be, a place no other WM/DM has ever gotten.

But I also don't want to deal with linux any more. Please don't sealion me with "but linux works fine for me!" here, but using linux feels like death by a thousand frustrations. Most recently I had to alias pulseaudio -k to pk because pulseaudio got out of whack so often I got used to killing it. That, plus I can't live with Ctrl-based shortucts anymore: I get serious pinky and wrist fatigue from a full day's work on linux. I can't be bothered to work around an entire missing staircase, so I switched back to macOS, where even if the WM isn't as good I can live with it.

(Incidentally, have you heard of yabai[1] / amethyst[2]? They're tiling WMs for macOS. I've been thinking of trying both out for a while now but I can't spare the time.)

1: https://github.com/koekeishiya/yabai/ 2: https://github.com/ianyh/Amethyst

- You need an extra click on another window before you can interact with it

- No focus-follows-mouse (there used to be 3rd party plugins but those seem to be gone now)

- While basic split screen tiling works and you can set up a global kb shortcut to move windows to left/right of the screen, Firefox seems to completely ignore those

- If you're running multiple displays macos for some reason always picks the most awkward display to open new windows in

- I really miss being able to grab and resize windows using a modifier key like in XFCE

All of these things can be done with yabai https://github.com/koekeishiya/yabai

https://github.com/koekeishiya/yabai is awesome, way more extreme than the other stuff. But it's super configurable and I love how it auto fills windows (but you may not, which can be configured)
yeah, I agree that macos seems to have the worst window management, both in design and implementation (particularily performance).

i3 sounds like a dream window manager to me, but in the meantime while I use Mac OS (& Windows), I've been using yabai, which is heavily inspired by i3 but limited by Mac OS.

https://github.com/koekeishiya/yabai

Ever since installing Arch + i3 on my old Macbook Pro years ago, traditional window managers feel so inferior now. I've been on the hunt, since, to find anything as close to i3 for MacOS as possible.

I did come close however...there's a hidden gem called Yabai[0] (formerly chunkwm) by koekeishiya on GitHub. For anyone looking for as close to i3 functionality as possible in MacOS, Yabai is definitely it. I'm really surprised I don't see more people recommend it as the developer has done an excellent job trying to bring the i3 experience to Mac.

[0]: https://github.com/koekeishiya/yabai

I'm no longer using a Mac (for employer reasons), but I had a lot of success with Yabai (free/open-source) before I switched. https://github.com/koekeishiya/yabai
If anyone’s looking to replicate this on OSX, check out yabai[0].

I have also been using skhrdc (same maintainer I believe) for key bindings and it’s an absolute blast.

[0]: https://github.com/koekeishiya/yabai

If you're a stickler for keeping your windows neat and orderly like I am, you may want to check out Yabai (+ skhd):

https://github.com/koekeishiya/yabai

I used to use BetterTouchTool and Stay to do this, but after a co-worker tipped me off on yabai+skhd, I've been extremely pleased and rarely have to think about window placement (took me a while to get the config "just right", of course).

I haven't tried it on Big Sur, but because of the way yabai can assign windows to spaces, I don't believe you'd face this issue.

I had a similar issue with window management on MacOS. I switched over to using Yabai about a year ago (a tiling window manager in the style of BSPWM on Linux) and haven't looked back since.

I've even managed to get Windows-style window management working in my config.

Link: https://github.com/koekeishiya/yabai

Yabai (https://github.com/koekeishiya/yabai) and skhd (https://github.com/koekeishiya/skhd) together makes a very powerful combination that works extremely well. It's as close to i3 as you can get on MacOS, and outside of a few odd things with 3 monitors I haven't run into any issues.

Yabai is actually the second iteration of tiling windows that koekeishiya has made and it's super well developed.

> The main reason for the switch was one killer app; the i3 window manager. Keyboard shortcuts, tiled windows, lightning fast to use - it feels like a piece of software designed for people who tinker and use computers a lot.

If that's the main reason, how about yabai on Mac? https://github.com/koekeishiya/yabai

> The primary function of yabai is tiling window management; automatically modifying your window layout using a binary space partitioning algorithm to allow you to focus on the content of your windows without distractions. Additional features of yabai include focus-follows-mouse, disabling animations for switching spaces, creating spaces past the limit of 16 spaces, and much more.

Yabai [1] turned out to be pretty sufficient replacement of i3 on macOS for me

[1] https://github.com/koekeishiya/yabai

If you're on Mac, I can't recommend the yabai [1]/skhd [2] combo enough!

I haven't used i3, so I don't know if yabai mirrors the i3 experience, but it's a very nice programmable keyboard-centric tiling wm for macOS.

[1] https://github.com/koekeishiya/yabai

[2] https://github.com/koekeishiya/skhd/

I have had a pretty stable setup using yabai[0] for my wm and skhd[1] for my hotkey daemon. Both are by the same dev and I have nothing but good things to say about them. Occasionally windows will get in a wonky state, but I have a hot key to reset them. It is usually stable for a week+

[0]https://github.com/koekeishiya/yabai [1]https://github.com/koekeishiya/skhd

Interesting! The active project (rewrite) moved here apparently: https://github.com/koekeishiya/yabai

Just to piggyback on your interest:

My comments were more in the way of evangelizing Plasma (iirc KDE is the company, Plasma is their DE product), to share awesome features that I'd love to see generalized on all platforms.

In searching for a productive DE, provided you only want GUI config on the user side and can learn to juggle between 3-4 settings panels, Plasma beats them all.

Defaults are very close to Windows 10 (rather the other way around historically but whatever), with a touch of Linux twist here and there (magnet sides, feature-rich title bar menu, etc.)

The more advanced stuff is only necessary to maximize X (real estate, aesthetics, shortcut-driven controls...), some of it becomes invaluable over time.

I strongly encourage you to spend some time with KDE's Plasma, it's inspiring regarding the 'desktop paradigm' insofar as we just want to refine, not disrupt it (familiarity is a good thing for users imho).

I cannot say enough good things about chwm (or yabai[0], as he now calls it), by far the best window management tool I've used on macOS. Unlike most other tools, it is instantaneous and requires no mental effort. In conjunction with skhd[1], it gives a super clean interface for you to completely control your desktop. It's only too bad that you have to disable SIP for all the APIs to get exposed.

[0]: https://github.com/koekeishiya/yabai

[1]: https://github.com/koekeishiya/skhd

Gonna drop a PSA, if anyone is moving from i3wm to OSX, check out yabai. https://github.com/koekeishiya/yabai
I've been using Yabai[0] for a few months and am generally pretty happy with the i3-like experience on macOS.

[0] https://github.com/koekeishiya/yabai

I would suggest checking out Yabai (https://github.com/koekeishiya/yabai) which is functionally similar to bspwm and allows quick switching workspaces (no animation or fade) and throwing windows to different workspaces or monitors.
I personally use Contexts (https://contexts.co) for switching between applications. It functions similar to rofi's application switcher (fuzzy keyboard driven switching).

There are a couple of automatic tiling window managers for MacOS, the most notable being Yabai (https://github.com/koekeishiya/yabai) and Amethyst (https://github.com/ianyh/Amethyst).

Yabai doesn't handle window switching on its own but it can use SKHD (https://github.com/koekeishiya/skhd) or any other application that can bind terminal commands to keyboard shortcuts such as Hammerspoon (https://www.hammerspoon.org) or BetterTouchTool (https://folivora.ai) or even Keyboard Maestro. The commands are context-aware of spaces and the placement of windows on the x-y plane so you can move between windows relative to their position on the screen.