Skip to content

yabai & sketchbar 打造自定义桌面

sketchbar

install

https://felixkratz.github.io/SketchyBar/setup

Github

yabai

install

https://github.com/koekeishiya/yabai/wiki#installation-requirements

需要关闭系统保护

https://github.com/koekeishiya/yabai/wiki/Disabling-System-Integrity-Protection

配置

ini
; ~/.config/yabai/yabairc
# for this to work you must configure sudo such that
# it will be able to run the command without password

yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa

# .. more yabai startup stuff

yabai -m config layout bsp
yabai -m config top_padding     40
yabai -m config window_gap      0

yabai -m config --space 5 layout float

yabai -m signal --add event=window_focused action="sketchybar -m --trigger window_focus &> /dev/null"
yabai -m signal --add event=window_title_changed action="sketchybar -m --trigger title_change &> /dev/null"

其他事项

sketchybar restart
sketchybar --hotload true 
yabai --restart-service

如果点击 space 文字按钮不能切换桌面了:

pkill Dock
sudo yabai --load-sa