Mac Pro Tips: How to install yabai and skhd

The Internet Patrol default featured image
Share the knowledge

Will Young

In our last post, we briefly went over yabai, which is a tiling window manager for macOS. If you’re not experienced with Linux systems, the concept of a window manager (WM) is likely foreign to you, so I’ll pause briefly to provide an explanation and definition of a window manager, specifically a “tiling” WM.

Paraphrasing from wiki, ‘a tiling window manager is a computer program that deals with organization of the screen into mutually non-overlapping frames, or “tiles”, as opposed to the more common approach of coordinate-based stacking of overlapping objects (windows) that tries to fully emulate the desktop metaphor’.

TL;DR: With a tiling WM, instead of new windows popping up anywhere, all open windows will be resized to occupy all available space on the screen. One window will take up your full screen, two? Each will take 50% of the screen, one on each side. Three open windows? You guessed it, each one will take up a third of your screen. But wait! There’s more. yabai will automatically organize, resize, collapse, hide, and manage all open windows and desktop spaces on your computer.

The benefits are numerous: faster reply times, less time spent altering your layout, and even just simply looking cool and badass, like a “sexy nerd”, as my girlfriend says.

Basically, you end up spending a lot less time reaching for your mouse, and using your mouse to manipulate your computer. You would (and will) be surprised how much of a difference this makes.

The Internet Patrol is completely free, and reader-supported. Your tips via CashApp, Venmo, or Paypal are appreciated! Receipts will come from ISIPP.

CashApp us Square Cash app link

Venmo us Venmo link

Paypal us Paypal link

You can’t do it alone, though – How are you supposed to resize a window? To move the cursor from the focused window to a different application? To move a window to a new desktop space? Well, keyboard shortcuts seem to be the obvious answer here, but yabai doesn’t do this out of the box, however; the developer of yabai has thought ahead for us, and created (with the public’s help) a lovely simple keyboard hotkey daemon, referred to as it’s abbreviation; “skhd“.

skhd, if you couldn’t gather already, is a background process, or “daemon”, that runs behind the scenes on your computer. It’s very simple, and it allows you to add more actions to your keyboard – for example, if you hit command + C on a mac, it copies the selected text. With skhd, you can create your own keyboard shortcuts, faster, and with much more granular flexibility than any other option I’m aware of.

Assuming you want to be a sexy nerd, a more efficient user, or both, let’s jump into the installation process of yabai + skhd. I’ll start with the steps detailed in the previous post:

Open terminal (or iTerm2, or kitty, or whatever) and install homebrew, the missing package manager for macOS, by pasting the following line and hitting enter.

/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”

Once that’s complete, you’ll need to get yabai, do so by pasting the following line into your terminal, then hitting enter.

brew install koekeishiya/formulae/yabai

Open System Preferences.app and navigate to Security & Privacy, then Privacy, then Accessibility. Click the lock icon at the bottom and enter your password to allow changes to the list. Then, start yabai by pasting the following line in terminal, without quotes, and hitting enter:

brew services start yabai

It will prompt you to allow yabai accessibility permissions. Check the box next to yabai to allow accessibility permissions.

Next, in order to install skhd, we’ll paste the following lines into terminal, then hit enter on each one individually (one line at a time):

brew install koekeishiya/formulae/skhd
brew services start skhd

The terminal, throughout this process, may prompt you at any point to install dependencies: go ahead and select yes, or allow. for all of them.

So, here at this point you should have properly installed yabai and skhd. You may notice a difference in your computer, or you may not. If you weren’t challenged by the process of using the terminal, or are experienced already, you can dig into configuration of yabai + skhd yourself – github has great documentation on each one, and it’s pretty simple, I believe your dotfiles are going to be ~/.yabairc and ~/.skhdrc.

If the previous sentence sounds like a foreign language to you, then tune in to our next installment, in which we’ll briefly guide you through configuring yabai and skhd to behave as you’d like them to!

The Internet Patrol is completely free, and reader-supported. Your tips via CashApp, Venmo, or Paypal are appreciated! Receipts will come from ISIPP.

CashApp us Square Cash app link

Venmo us Venmo link

Paypal us Paypal link

Get New Internet Patrol Articles by Email!


Share the knowledge

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.