-
Notifications
You must be signed in to change notification settings - Fork 50
Install & configure dependencies
Adam Wagner edited this page Nov 28, 2020
·
9 revisions
First, install yabai
, Hammerspoon
, and jq
. 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 cask install hammerspoon
) (getting started guide) -
https://github.com/stedolan/jq (
brew install jq
)
- Ensure Hammerspoon is running
- Open the hammerspoon console via the menu bar
- Type
hs.ipc.cliInstall()
and hit return
First, open the hammerspoon console via the menu bar | Next, type `hs.ipc.cliInstall()` and hit return |
---|---|
![]() |
![]() |
Finally confirm that hs
is now available by entering the following in your terminal (shell):
❯ which hs
/usr/local/bin/hs
If the of which hs
is /usr/local/bin/hs
, then the Hammerspoon cli is correctly installed!
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')