This repository contains my standalone Yabai and Skhd configurations.
As tiling windows management, every times window created, it will allocate a space for it to avoid window overlap to each other.
You'll never suffering messy window display for desktop.
![](https://github.com/z20240/yabai/raw/master/assets/auto-split-window-by-focus.gif)
# --- install yabai, skhd, jq
$ brew install koekeishiya/formulae/yabai
$ brew install jq
$ brew install koekeishiya/formulae/skhd
# --- Remove previous links
$ rm -f "${HOME}"/.{yabai,skhd}rc
# --- Install configs
$ git clone https://github.com/z20240/yabai.git "${HOME}"/.config/yabai
$ ln -s "${HOME}/.config/yabai/yabai/yabairc" "${HOME}/.yabairc"
$ ln -s "${HOME}/.config/yabai/skhd/skhdrc" "${HOME}/.skhdrc"
# --- Will automatically start Yabai & Skhd when computer starts
$ brew services start yabai
$ brew services start skhd
# --- (options) Install stackline part. --- #
### stackline can show icons aside by your stacked windows to announce the stack windows.
$ brew install hammerspoon --cask
# Install stackline (https://github.com/AdamWagner/stackline)
# Get the repo
$ git clone https://github.com/AdamWagner/stackline.git ~/.hammerspoon/stackline
# Make stackline run when hammerspoon launches
$ cd ~/.hammerspoon
$ cp ~/.hammerspoon/stackline/conf.lua ~/.hammerspoon/stakeline_config.lua
# **Hint**: If your mac is M1 structure - you have to change the code below
# -- in stackline/conf.lua
# c.paths.yabai = '/opt/homebrew/bin/yabai' -- silicon mac, M1
# c.paths.yabai = '/usr/local/bin/yabai' -- intel version.
echo 'stackline = require "stackline"' >> init.lua
echo 'local stackline_config = require "stackline_config"' >> init.lua
echo 'stackline:init(stackline_config)' >> init.lua
Reload / restart the yabai launch agent
ctrl + alt + cmd + r
Show / hide items on desktop
cmd + f3
Toggle full screen / up-full screen
alt + cmd + space
Action |
Key Combination |
Move left |
ctrl + alt + cmd + left |
Move right |
ctrl + alt + cmd + right |
Move up |
ctrl + alt + cmd + up |
Move down |
ctrl + alt + cmd + down |
Action |
Key Combination |
Focus left |
alt + cmd + left |
Focus right |
alt + cmd + right |
Focus up |
alt + cmd + up |
Focus down |
alt + cmd + down |
Action |
Key Combination |
Resize left |
ctrl + alt + cmd + home |
Resize right |
ctrl + alt + cmd + end |
Resize up |
ctrl + alt + cmd + pageUp |
Resize down |
ctrl + alt + cmd + pageDown |
Action |
Key Combination |
Stack left |
shift + alt + cmd + left |
Stack right |
shift + alt + cmd + right |
Focus Windows (stack mode)
Action |
Key Combination |
Focus up |
shift + alt + cmd + up |
Focus down |
shift + alt + cmd + down |
Toggle float / Un-float mode window
ctrl + alt + cmd + space
Move Windows (floating mode)
Action |
Key Combination |
Move left |
alt + cmd + left |
Move right |
alt + cmd + right |
full screen |
alt + cmd + up |
place window to screen center |
alt + cmd + down |
Move up left |
alt + cmd + home |
Move down right |
alt + cmd + end |
Move up right |
alt + cmd + pageUp |
Move down left |
alt + cmd + pageDown |
Action |
Key Combination |
Send to prev space |
ctrl + cmd + left |
Send to next space |
ctrl + cmd + right |
Send to space (1-9) |
ctrl + cmd + 1 - 9 |
Send Window to Monitors (Displays)
Action |
Key Combination |
Send to prev monitor |
ctrl + alt + left |
Send to next monitor |
ctrl + alt + right |
Focus Monitors (Displays)
Action |
Key Combination |
Focus monitor 1 |
ctrl + alt + 1 |
Focus monitor 2 |
ctrl + alt + 2 |
Focus monitor 3 |
ctrl + alt + 3 |
Action |
Key Combination |
Window rotate clockwise |
alt + cmd + r |
Window rotate anticlockwise |
shift + alt + cmd + r |
Window Equalize size |
alt + cmd + | |
Enable / Disable gaps |
alt + cmd + g |