top | item 29215976

Yabai is a tiling window manager for macOS

51 points| c54 | 4 years ago |github.com | reply

54 comments

order
[+] weikju|4 years ago|reply
> System Integrity Protection needs to be (partially) disabled for yabai to inject a scripting addition into Dock.app for controlling windows with functions that require elevated privileges.

To me, this is a dealbreaker. I don't want to disable SIP (it seems to break some software..), even if temporarily. I'm assuming that as soon as my OS gets updated, I would need to go through this process all over again... I'm getting too old for this.

[+] square_usual|4 years ago|reply
You can use Yabai perfectly well without disabling SIP. I ran it for a while like that, and only stopped using it because I wanted something else entirely.
[+] NateEag|4 years ago|reply
I use Hammerspoon to get something like tiled window management.

Hammerspoon is not a window manager out of the box - it's more a toolkit for building the one you want, along with a lot of tools for automating various aspects of OS X.

The thing I like most about my config is how I have windows automatically resizing and positioning themselves when monitor count changes.

Maybe OS X is better now than it used to be, but I used to subconsciously dread connecting or disconnecting external monitors because I'd spend several minutes fixing my windows afterwards.

After configuring Hammerspoon, that suffering became a thing of the past (If you're curious, you can find that code here: https://github.com/NateEag/dotfiles/blob/d8c81c3890af65bf431...).

[+] ketzo|4 years ago|reply
For an alternative that I have been using daily for a few years: ianyh.com/amethyst
[+] tuananh|4 years ago|reply
+1. amethyst is a lot easier to use than yabai. yabai has more features though.
[+] girvo|4 years ago|reply
I'd like to second this recommendation. I've been running Amethyst for so many years now I've forgotten how long ago I came across it. It's indispensable to my workflow on macOS!
[+] MaxikCZ|4 years ago|reply
Am I misunderstanding what this is or is this something that would benefit a lot from having a few screenshot in "what is this" part of readme?
[+] jitl|4 years ago|reply
It usually looks like a bunch of normal windows next to each other, and maybe some kind of border around the focused window. Probably a video would be a better illustration. I looked at a few minutes of the top videos for “yabai” on YouTube and liked this one the most:

https://youtu.be/JL1lz77YbUE

[+] caslon|4 years ago|reply
Window managers on Aqua do a lot less than you're thinking if you're coming off of conventional UNIX window managers. All they do is move the windows; they don't draw anything.
[+] nhumrich|4 years ago|reply
If you don't understand enough from the readme, you are most likely not the target market. But yes, if they want to attract new people to tiling in general, they should use screenshots. But trust me when I say screenshots don't do tiling justice. It's something you have to use, and feel, to understand. The "look" of tiling is possible without tiling, so it doesn't look all to impressive. It's all about the usability, not the look.
[+] jdanp|4 years ago|reply
Yabai is awesome and a complete game changer on MacOS with skhd setup as a hotkey daemon. I set it up to mirror my i3 setup on ArchLinux and couldn't be happier. Switching to that and VIM per "The Mouseless Dev" book sped up my coding speed 3-4 times within a few months. I recommend everyone try to make the switch, but few are brave enough to do so.
[+] michelledepeil|4 years ago|reply
Pretty cool! But my god, it's still quite some work to reach i3wm-level keyboard control.
[+] jdanp|4 years ago|reply
The hardest part for me was finding a good dotfile to base my hotkeys off of, and it's not quite as performant of course.
[+] saagarjha|4 years ago|reply
If the author’s around, one thing I’d like to ask is why the entire thing appears to be in C except for the small parts that apparently had to call into Objective-C. Some sort of personal challenge? Undying love for the language? I seem to recall this replacing another project that was similarly all in on C++ called chunkwm (now totally nuked?) and I’m curious what the history is here.
[+] JoachimS|4 years ago|reply
Esp since it seems to have SIP disabled, implementing this is in C seems a bit scary.
[+] stevewillows|4 years ago|reply
I love yabai. I don't do anything fancy with it, but I found that its one of the few twms for MacOS that can do three up on the left with a large window on the right.

I also love that it isn't locked into auto-balancing windows. For me, I don't want my three-up to be the same size.

For those concerned that SIP needs to be completely disabled, you can use [1]

    csrutil enable --without fs --without debug
All in all, yabai is great and really is the best twm for MacOS at this time. The installation and config is a breeze, too.

[1] https://github.com/koekeishiya/yabai/discussions/5#discussio...

[+] bradknowles|4 years ago|reply
My understanding is that tiling window managers went out with the first versions of MS Windows back in the early 90s.

I’m truly confused. Why would anyone want tiling window managers in the modern era?

[+] iotku|4 years ago|reply
The main difference of note is virtual desktops (typically 10). While it may seem like a large limitation to not have overlapping windows (aside from modern tiling managers also having the ability to have floating windows) having multiple workspaces automatically partitioned into useful layouts that can be called instantly (rather than tabbing through windows lists or otherwise selecting something with a mouse) can be beneficial to some people's workflows.

It's not the end all be all of how you can use a computer, but some people manage to make it quite effective and fast to have a keyboard driven tiling wm.

[+] extr|4 years ago|reply
Other commenters are speaking to the ability to have them auto-configure to specific layouts, which is indeed useful for some people. I also find they provide easier window management/navigation on laptops. Rather than using gestures, task view, or alt-tabbing to find your window, you typically have specific groups of windows on specific virtual desktops which are bound to predictable hotkeys. So you might have something going on like:

Desktop 1 = WinKey + 1 = Browser

Desktop 2 = WinKey + 2 = Email application + WIP Reply

Desktop 3 = WinKey + 3 = Multiple Chat Apps

Desktop 4 = WinKey + 4 = IDE

Desktop 5 = WinKey + 5 = Debug Window + Documentation + Another Browser

I don't really have any hard and fast rules for what goes where, I just let things develop organically and don't restart my computer that often. For me, I find the ease/convenience of this makes working on a laptop 10x better. It sounds crazy but I almost prefer working on a laptop screen with a good Tiling WM to docking it with multiple screens.

On a larger/multiple screens, I find it's less necessarily to have the full features of a tiling WM. Something like FancyZones in PowerToys is good enough.

[+] howinteresting|4 years ago|reply
I find it impossible to do programming work on a large monitor without a tiling WM. With one, it's a delight. No alt-tabbing, just switching between many desktops.
[+] iCarrot|4 years ago|reply
I'm not sure what was the use case back then, but today plus-sized 4k+ screens or ultra wide screens are commonplace. There's simply too much real estate for a single application window.
[+] hinoki|4 years ago|reply
How did they pick a name? In Japanese it’s:

> Yabai is an adjective denoting that something is bad or dangerous. Its original connotations were that the speaker felt he or she was in imminent danger or was about to be inconvenienced.

Maybe it’s an apt name because it needs SIP disabled :-)

https://web-japan.org/trends/buzz/bz0510.html

[+] saagarjha|4 years ago|reply
Yabai has a bunch of meanings, including a slang meaning along the lines of "awesome". Based on the author's other projects, I suspect they are, for lack of a better term, a weeb.
[+] sandebert|4 years ago|reply
When an app has a name starting in YA, it's fairly common that it stands for Yet Another. No idea if that's true here, or what the rest of their name stands for though.
[+] hboon|4 years ago|reply
Is there a great tutorial, probably one of the rare cases where video is helpful, to show why a tiling window manager is useful, especially for macOS?
[+] jdanp|4 years ago|reply
I mostly saw the value from watching Twitch coding streams. I found "The Mouseless Dev" book really helpful in setting up Archlinux with i3 and VIM as a guideline to try it out, then once I saw the value spent some time setting up MacOS with Yabai and similar hotkeys to my Archlinux setup. I'll say, it's pretty much increased my productivity by 3-4x and keeps my mind fully engaged on the coding task at hand.
[+] seastonATccs|4 years ago|reply
I recently had to move to a Mac from windows at work. It's all propaganda, UX for macOS sucks. Apple doesn't know shit about a good UI. Despite the hardware shenanigans of windows 11 the UX was spot on. WSL2 on windows was a really good spot.

WTH should I need a 3rd party tool to do half decent window tile management?

[+] smoldesu|4 years ago|reply
Yabai looks very neat, but I've always wondered if it's replacing the window server on MacOS or merely existing on top of it. Does it disable things like the dock and menubar when they're not in use, or are they still loaded and consuming CPU/GPU resources?
[+] c7DJTLrn|4 years ago|reply
It does the latter and unfortunately it doesn't compare to i3/sway for that reason. It feels way too sluggish and clunky, with windows often not conforming to the right size.
[+] p_l|4 years ago|reply
you can't replace windowserver. period.

How yabai and amethyst work is by using bits of accessibility and other APIs, though Yabai also injects some bits into Dock binary I believe.

[+] jitl|4 years ago|reply
It’s a scripting and behavior layer on top of the native WindowServer.
[+] shantanujoshi|4 years ago|reply
Insane for my workflow when coupled w/ SKHD. Wouldn't use macos w/o it.
[+] jdanp|4 years ago|reply
Glad there's someone else who's seen the light, I'll never go back :). I wish it was more natively supported, it might make me make the switch to MacOS for good (well if they fix their new trash keyboards and ditch USB-C).
[+] diimdeep|4 years ago|reply
I have to confess that without a prior experience with tiling managers and after a few months with yabai+skhd, only feature I use is `alt - t : yabai -m window --toggle float;`

I guess that this is very limited experience, anyone got hints ?