-
Notifications
You must be signed in to change notification settings - Fork 46
Install & configure dependencies
John Alberts edited this page Oct 26, 2022
·
7 revisions
First, install yabai
, Hammerspoon
. More information about how to set up each dependency can be found in the respective repository.
-
https://github.com/koekeishiya/yabai (
brew install yabai
) (install guide) -
https://github.com/Hammerspoon/hammerspoon (
brew install --cask hammerspoon
) (getting started guide)
- Ensure Hammerspoon is running
- Open the hammerspoon console via the menu bar
- Type
hs.ipc.cliInstall()
and hit return - Confirm that
hs
is now available by entering the following in your terminal (shell):
❯ which hs
/usr/local/bin/hs
First, open the hammerspoon console via the menu bar | Next, type `hs.ipc.cliInstall()` and hit return |
---|---|
![]() |
![]() |
You're free to bind yabai commands using your favorite key remapper tool (skhd, Karabiner Elements, and even Hammerspoon are all viable options).
That said, you're probably using skhd.
If so, now is a good time to map keys for navigating and manipulating yabai stacks:
# Focus window up/down in stack
ctrl - n : yabai -m window --focus stack.next
ctrl - p : yabai -m window --focus stack.prev
# Add the active window to the window or stack to the {direction}
# Note that this only works when the active window does *not* already belong to a stack
cmd + ctrl - left : yabai -m window west --stack $(yabai -m query --windows --window | jq -r '.id')
cmd + ctrl - down : yabai -m window south --stack $(yabai -m query --windows --window | jq -r '.id')
cmd + ctrl - up : yabai -m window north --stack $(yabai -m query --windows --window | jq -r '.id')
cmd + ctrl - right : yabai -m window east --stack $(yabai -m query --windows --window | jq -r '.id')