koekeishiya / yabai

A tiling window manager for macOS based on binary space partitioning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

external_bar option not honored but works if i type it manually

jacobrreed opened this issue · comments

I have the following at end of my yabairc:
yabai -m config external_bar all:25:0
and when I reload yabai it covers the status bar at top, but if i type the command into the terminal after reload it works.

#!/usr/bin/env sh
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"

# global settings
# yabai -m config focus_follows_mouse autoraise
yabai -m config window_topmost off
yabai -m config window_shadow off
yabai -m config window_opacity on
yabai -m config window_opacity_duration 0.0
yabai -m config active_window_opacity 1
yabai -m config normal_window_opacity 1
yabai -m config insert_feedback_color 0xff61afef
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
yabai -m config mouse_drop_action swap
yabai -m config layout bsp
yabai -m config top_padding 0
yabai -m config bottom_padding 10
yabai -m config left_padding 5
yabai -m config right_padding 5
yabai -m config window_gap 10

# Create spaces 
function setup_space {
  local idx="$1"
  local name="$2"
  local display="$3"
  local space=
  echo "setup space $idx : $name"

  space=$(yabai -m query --spaces --space "$idx")
  if [ -z "$space" ]; then
    yabai -m space --create
    yabai -m space "$idx" --display "$display"
  fi

  yabai -m space "$idx" --label "$name"
}
setup_space 1 dev 1
setup_space 2 zoom 1
setup_space 3 email 1
setup_space 4 notes 1
setup_space 5 slack 2
for idx in $(yabai -m query --spaces | jq '.[].index | select(. > 5)' | sort -nr); do
  yabai -m space --destroy "$idx"
done

# Rules
yabai -m rule --add app="^System Preferences$" manage=off
yabai -m rule --add app="^System Settings$" manage=off
yabai -m rule --add app="^Cisco Secure Client$" manage=off
yabai -m rule --add app="^Calculator$" manage=off
yabai -m rule --add app="^Bitwarden$" manage=off
yabai -m rule --add app=".*zoom.*" manage=on space=$(yabai -m query --spaces | jq '.[] | select(.label=="zoom")' | jq '.index')
yabai -m rule --add app=".*Outlook.*" manage=on space=$(yabai -m query --spaces | jq '.[] | select(.label=="email")' | jq '.index')
yabai -m rule --add app=".*Obsidian.*" manage=on space=$(yabai -m query --spaces | jq '.[] | select(.label=="notes")' | jq '.index')
yabai -m rule --add app=".*Slack.*" manage=on space=$(yabai -m query --spaces | jq '.[] | select(.label=="slack")' | jq '.index')
yabai -m rule --add app=".*Authenticator.*" manage=off
yabai -m rule --add title=".*Reminder" manage=off space=$(yabai -m query --spaces | jq '.[] | select(.label=="dev")' | jq '.index')
yabai -m rule --add app=".*Falcon Notifications.*" manage=off

borders \
  "active_color=gradient(top_left=0xff37f499,bottom_right=0xff04d1f9)" \
  "inactive_color=gradient(top_left=0x4D37f499,bottom_right=0x4D04d1f9)" \
  width=5


yabai -m config external_bar all:25:0
killall sketchybar && sketchybar 

# S K E T C H Y B A R  E V E N T S
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"

Try to move up yabai -m config external_bar all:25:0 to the rest of the config lines.