yabai
yabai copied to clipboard
Desktop showed on top of windows
Desktop folders suddenly showed on top of windows. Everywhere i click on the screen forces focus on Finder. brew service restart yabai
does not help. I have to restart Mac to fix it. Using yabai-v5.0.1.
yabairc:
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa
yabai -m config layout bsp
yabai -m config window_placement second_child
yabai -m config split_ratio 0.5
yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
yabai -m config mouse_drop_action swap
yabai -m config window_topmost on

I also encountered this today. Here were my steps to reproduce:
- Open a PDF from an icon on the desktop
- Observe that icons appeared above the Preview window
- Cmd+Tab to Preview, then Cmd+Q to quit
- Note that behavior still continues after switching to other desktops, except for Google Chrome
- Log out and log back in to reset
yabairc
#!/usr/bin/env sh
#
# for this to work you must configure sudo such that
# it will be able to run the command without password
#
# see this wiki page for information:
# - https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition
#
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa
#
# global settings
yabai -m config \
layout bsp \
mouse_follows_focus off \
focus_follows_mouse autoraise \
window_origin_display default \
window_placement second_child \
window_zoom_persist on \
window_topmost on \
window_shadow float \
window_animation_duration 0.05 \
window_animation_frame_rate 120 \
window_opacity_duration 0.2 \
active_window_opacity 1.0 \
normal_window_opacity 0.95 \
window_opacity on \
insert_feedback_color 0xffd75f5f \
active_window_border_color 0xff775759 \
normal_window_border_color 0xff555555 \
window_border_width 4 \
window_border_radius 12 \
window_border_blur off \
window_border_hidpi on \
window_border off \
split_ratio 0.50 \
split_type auto \
auto_balance off \
top_padding 0 \
bottom_padding 0 \
left_padding 0 \
right_padding 0 \
window_gap 5 \
mouse_modifier shift \
mouse_action1 move \
mouse_action2 resize \
mouse_drop_action swap
yabai -m rule --add app="Alacritty" sticky=on layer=above manage=off
yabai -m rule --add app="Emacs" title!="^\$" manage=on
yabai -m rule --add app="Emacs" title="^\$" manage=off
yabai -m rule --add app="Mail" manage=on
# applications with custom rules
applications="(Calendar|Mail|Reminders|Notes|Microsoft Outlook|Discord|Messages|Slack|Firefox|Chrome|Code|Microsoft Word|Preview|Terminal|iTerm2|QuickTime|Player|Spotify|Music|Brave Browser|Kitty|Trello)"
# NOTE: you need to set the settings for the applications in the
# list first, or else they don't apply properly and you can end up with
# some weird border/float/window behaviours
# everything listed gets sent to below layer to prevent
# them from covering floating applications/popup windows
yabai -m rule --add app="^${applications}$" manage=on layer=below
echo "yabai configuration loaded.."
Should be fixed in latest version.