i3wm民がMacにyabaiを導入するときの設定
以下のように設定すれば良いです。
code: .yabairc
# global settings
yabai -m config mouse_follows_focus on
yabai -m config focus_follows_mouse autoraise
yabai -m config focus_follows_mouse on
yabai -m config window_placement second_child
yabai -m config window_topmost on
yabai -m config window_shadow on
yabai -m config window_opacity on
yabai -m config window_opacity_duration 0.0
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.95
yabai -m config window_border on
yabai -m config window_border_width 1
yabai -m config window_border_radius 12
yabai -m config window_border_blur off
yabai -m config window_border_hidipi on
yabai -m config active_window_border_color 0xff775759
yabai -m config normal_window_border_color 0xff555555
yabai -m config insert_feedback_color 0xaad75f5f
yabai -m config split_ratio 0.50
yabai -m config auto_balance on
yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
# general space settings
yabai -m config layout bsp
yabai -m config top_padding 6
yabai -m config bottom_padding 6
yabai -m config left_padding 6
yabai -m config right_padding 6
yabai -m config window_gap 2
# yabai -m config top_padding 12
# yabai -m config bottom_padding 12
# yabai -m config left_padding 12
# yabai -m config right_padding 12
# yabai -m config window_gap 06
# rules
yabai -m rule --add app="^Spark$" manage=off
yabai -m rule --add app="^Windows 11$" manage=off
yabai -m rule --add app="^System Preferences$" manage=off
yabai -m rule --add app="^Karabiner-Elements$" manage=off
yabai -m rule --add app="^Karabiner-MultitouchExtension$" manage=off
code: .skhdrc
# focus window
# | | i3-wm | yabai |
# | ---------------- | ----------- | ---------- |
# | フォーカスの移動 | $mod + jkl; | alt + hjkl |
alt - h: yabai -m window --focus west || yabai -m display --focus west
alt - l: yabai -m window --focus east || yabai -m display --focus east
alt - j: yabai -m window --focus south || yabai -m display --focus south
alt - k: yabai -m window --focus north || yabai -m display --focus north
# move window
# | | i3-wm | yabai |
# | -------------------| -------------------- | ------------------- |
# | ウィンドウをワープ | $mod + shift + jkl; | shift + alt + hjkl |
# | スペースにワープ | $mod + shift + num | shift + alt + 12345 |
# | ↑(prev/next) | -- | shift + alt + 9/0 |
shift + alt - h : yabai -m window --swap west || $(yabai -m window --display west; yabai -m display --focus west)
shift + alt - j : yabai -m window --swap south || $(yabai -m window --display south; yabai -m display --focus south)
shift + alt - k : yabai -m window --swap north || $(yabai -m window --display north; yabai -m display --focus north)
shift + alt - l : yabai -m window --swap east || $(yabai -m window --display east; yabai -m display --focus east)
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 - 9 : yabai -m window --space prev
shift + alt - 0 : yabai -m window --space next
# fullscreen / floating
# | | i3-wm | yabai |
# | ----------------------- | -------------------- | ------------------- |
# | フルスクリーン (native) | $mod + f | shift + alt + f |
# | フルスクリーン (zoom) | たぶん存在しない | alt + f |
# | toggle floting | $mod + shift + space | shift + alt + space |
# toggle window native fullscreen
shift + alt - f : yabai -m window --toggle native-fullscreen
# toggle window fullscreen zoom
alt - f : yabai -m window --toggle zoom-fullscreen
# float / unfloat window and restore position
shift + alt - space : yabai -m window --toggle float && yabai -m window --grid 4:4:1:1:2:2
# toggle window split type
# | | i3-wm | yabai |
# | ---------------------- | --------- | -------- |
# | splith/splitv (toggle) | $mod + e | alt + e |
alt - e : yabai -m window --toggle split
# rotate window
# | | i3-wm | yabai |
# | -------------- | ----- | ---------- |
# | rotate 90 | | alt + r |
# | mirror x or y | | alt + x y |
# rotate tree
alt - r : yabai -m space --rotate 90
# mirror tree y-axis
alt - y : yabai -m space --mirror y-axis
# mirror tree x-axis
alt - x : yabai -m space --mirror x-axis
# restart yabai
# (2022-10-11 21:24)
ctrl + alt + cmd - r : launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"