# list of built-in keywords at https://github.com/koekeishiya/skhd/issues/1 # staring file was at /opt/homebrew/opt/yabai/share/yabai/examples ########################################################################################## # yabai # general idea: alt navigates (move my view); shift+alt modifies (move/change windows) # switch to space (to leave SIP in place, configure these in macos system settings) # alt - 1 // switch to space 1 (and similar for other numbers) # in managed mode: swap current window shift + alt - k : yabai -m window --swap north shift + alt - j : yabai -m window --swap south shift + alt - h : yabai -m window --swap west # TODO: remove, only have j/k (just stack) shift + alt - l : yabai -m window --swap east # TODO: remove, only have j/k (just stack) # move focused window to the given space shift + alt - 1 : yabai -m window --space 1 shift + alt - 2 : yabai -m window --space 2 shift + alt - 3 : yabai -m window --space 3 shift + alt - 4 : yabai -m window --space 4 shift + alt - 5 : yabai -m window --space 5 shift + alt - 6 : yabai -m window --space 6 shift + alt - 7 : yabai -m window --space 7 shift + alt - 8 : yabai -m window --space 8 shift + alt - 9 : yabai -m window --space 9 # all windows in a space to float and each fill screen (idea: stack mode) shift + alt - s : yabai -m space --layout float \ | yabai -m query --windows --space | jq '.[].id' \ | xargs -I % yabai -m window % --grid 1:1:0:0:1:1 # toggle float on/off for the focused window shift + alt - f : yabai -m window --toggle float # all windows in a space back to the grid (managed) shift + alt - g : yabai -m space --layout bsp # balance window sizes shift + alt - 0 : yabai -m space --balance # TODO: figure out better key option # managed layout, focus on next/previous window #alt - x : yabai -m window --focus next # TODO: delete or figure out better key option #alt - z : yabai -m window --focus prev # TODO: delete or figure out better key option # focus on next/previous window; hacky, but it seems to work for now alt - k : yabai -m query --windows --space | jq '.[].id' | sort | tr "\r\n" " " \ | sed "s/\(.*\)/ \1 \n/" \ | sed "s/.* $(yabai -m query --windows --window | jq '.id') \([0-9]*\) .*/\1/" \ | xargs -I % yabai -m window --focus % alt - j : yabai -m query --windows --space | jq '.[].id' | sort | tr "\r\n" " " \ | sed "s/\(.*\)/ \1 \n/" \ | sed "s/.* \([0-9]*\) $(yabai -m query --windows --window | jq '.id') .*/\1/" \ | xargs -I % yabai -m window --focus %