|
#~/.config/skhd/skhdrc |
|
# Alt + Enter to toggle fullscreen |
|
alt - return : yabai -m window --toggle zoom-fullscreen |
|
|
|
# Use a fast shell for commands |
|
.shell "/bin/dash" |
|
|
|
# -------------------------------------------------------- |
|
# Groups and reusable commands |
|
# -------------------------------------------------------- |
|
|
|
# Example process groups if you later want app specific behavior |
|
.define terminal_apps ["kitty", "wezterm", "terminal", "iterm2"] |
|
.define browser_apps ["chrome", "google chrome", "safari", "firefox", "arc"] |
|
|
|
# Reusable yabai commands |
|
.define yabai_focus : yabai -m window --focus {{1}} || yabai -m display --focus {{1}} |
|
.define yabai_swap : yabai -m window --swap {{1}} || (yabai -m window --display {{1}} && yabai -m display --focus {{1}}) |
|
.define yabai_resize : yabai -m window --resize {{1}}:{{2}}:{{3}} |
|
|
|
# Nice to have for toggling apps or scratchpads later (not heavily used below, |
|
# but leaving here for you) |
|
.define toggle_app : open -a "{{1}}" || osascript -e 'tell app "{{1}}" to quit' |
|
.define toggle_scratchpad : yabai -m window --toggle {{1}} || open -a "{{2}}" |
|
|
|
|
|
# -------------------------------------------------------- |
|
# Core window |
|
# Using: alt + h/j/k/l as the "window nav" cluster |
|
# -------------------------------------------------------- |
|
|
|
# Focus windows in BSP directions |
|
alt - h : @yabai_focus("west") |
|
alt - j : @yabai_focus("south") |
|
alt - k : @yabai_focus("north") |
|
alt - l : @yabai_focus("east") |
|
|
|
# Swap current window with neighbor (rearrange layout) |
|
alt + shift - h : @yabai_swap("west") |
|
alt + shift - j : @yabai_swap("south") |
|
alt + shift - k : @yabai_swap("north") |
|
alt + shift - l : @yabai_swap("east") |
|
|
|
# Resize current split a bit each time |
|
# left/right shrink/expand horizontally, up/down vertically |
|
alt + ctrl - h : @yabai_resize("left", "-20", "0") |
|
alt + ctrl - l : @yabai_resize("right", "20", "0") |
|
alt + ctrl - k : @yabai_resize("top", "0", "-20") |
|
alt + ctrl - j : @yabai_resize("bottom","0", "20") |
|
|
|
|
|
# -------------------------------------------------------- |
|
# Space and display navigation |
|
# -------------------------------------------------------- |
|
|
|
# Focus spaces |
|
alt - 1 : yabai -m space --focus 1 |
|
alt - 2 : yabai -m space --focus 2 |
|
alt - 3 : yabai -m space --focus 3 |
|
alt - 4 : yabai -m space --focus 4 |
|
|
|
# Move window to space but stay focused on it |
|
alt + shift - 1 : yabai -m window --space 1; yabai -m space --focus 1 |
|
alt + shift - 2 : yabai -m window --space 2; yabai -m space --focus 2 |
|
alt + shift - 3 : yabai -m window --space 3; yabai -m space --focus 3 |
|
alt + shift - 4 : yabai -m window --space 4; yabai -m space --focus 4 |
|
|
|
# Cycle displays with the current window |
|
alt - d : yabai -m window --display next; yabai -m window --focus recent |
|
|
|
|
|
# -------------------------------------------------------- |
|
# yabai layout helpers |
|
# -------------------------------------------------------- |
|
|
|
# Toggle floating / tiling for current window |
|
alt - f : yabai -m window --toggle float |
|
|
|
# Re-balance the current space (fix weird ratios) |
|
alt - b : yabai -m space --balance |
|
|
|
# Make current window "primary" on this space |
|
alt - m : yabai -m window --swap biggest |
|
|
|
# Rotate layout 90 degrees |
|
alt - r : yabai -m space --rotate 90 |
|
|
|
|
|
# -------------------------------------------------------- |
|
# Optional: simple app toggles (comment out if you do not want them) |
|
# -------------------------------------------------------- |
|
|
|
# Example: quickly toggle a couple of frequent apps |
|
# alt - t : @toggle_app("Terminal") |
|
# alt - c : @toggle_app("Visual Studio Code") |
|
alt - o : @toggle_app("Obsidian") |