koekeishiya / yabai

A tiling window manager for macOS based on binary space partitioning
MIT License
22.48k stars 630 forks source link

Restarting the yabai service causes yabai to manage previously unmanaged windows #2322

Open gloesch opened 1 month ago

gloesch commented 1 month ago

I have a yabairc with the following sort of rules:

yabai -m rule --add app="Finder" manage=off

If I have a Finder window open (unmanaged, can drag around without snapping) and then restart yabai with yabai --restart-service (usually after I do a config change), the previously open and unmanaged Finder window is now managed.

If I close and open a new Finder window, it's not managed as expected. This happens with another application I selectively manually manage.

I just recently updated from something yabai-5.x.x to latest yabai-v7.1.1, so perhaps I missed some logic/config breaking change?

Any help would be great.

tamasgal commented 2 weeks ago

I am using this line and it works fine:

yabai -m rule --add app="^Finder$" sub-layer=above manage=off

gloesch commented 1 week ago

@tamasgal do you mind sharing your version and also full config? I tried something similar, and I still have the same behavior.

And what macOS version are you using? I'm on Sonoma 14.5

tamasgal commented 1 week ago

I am still on macOS Sonoma 14.3 (23D56), maybe that's the reason 😕

Here is my full config:

#!/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
#

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

# global settings
yabai -m config                                 \
    mouse_follows_focus          off            \
    focus_follows_mouse          off            \
    window_origin_display        default        \
    window_placement             second_child   \
    window_topmost               off        \
    window_zoom_persist          on             \
    window_shadow                float             \
    window_animation_duration    0.0            \
    window_animation_frame_rate  120            \
    window_opacity               off            \
    window_opacity_duration      0.0            \
    active_window_opacity        1.0            \
    normal_window_opacity        0.40           \
    insert_feedback_color        0xffd75f5f     \
    split_ratio                  0.50           \
    split_type                   auto           \
    auto_balance                 off            \
    top_padding                  3             \
    bottom_padding               3             \
    left_padding                 3             \
    right_padding                3             \
    window_gap                   3             \
    layout                       bsp            \
    mouse_modifier               fn             \
    mouse_action1                move           \
    mouse_action2                resize         \
    mouse_drop_action            swap

yabai -m rule --add app="^System Settings$" sub-layer=above manage=off
yabai -m rule --add app="^Calculator$" sub-layer=above manage=off
yabai -m rule --add app="^Finder$" sub-layer=above manage=off
yabai -m rule --add app="^Karabiner-Elements$" sub-layer=above manage=off
yabai -m rule --add app="^MenuMeters$" sub-layer=above manage=off
yabai -m rule --add app="^Step Two$" sub-layer=above manage=off
yabai -m rule --add app="^Messages$" sub-layer=above manage=off
yabai -m rule --add app="^Calendar$" sub-layer=above manage=off
yabai -m rule --add app="^Signal$" sub-layer=above manage=off
yabai -m rule --add app="^VLC$" sub-layer=above manage=off
yabai -m rule --add app="^QuickTime Player$" sub-layer=above manage=off
yabai -m rule --add app="^Fusion$" sub-layer=above manage=off
yabai -m rule --add app='^Autodesk.*$' sub-layer=above manage=off
yabai -m rule --add app='^julia$' title='^RainbowAlga$' sub-layer=above manage=off
yabai -m rule --add app='^Hearthstone$' sub-layer=above manage=off

yabai -m config external_bar all:25:0
borders active_color=0xffebd234 inactive_color=0xff555555 width=6.0

echo "yabai configuration loaded.."
gloesch commented 1 week ago

yeah, my config looks really similar. Well if you happen to upgrade and don't have the issue or upgrade and do have the same issue, would love to know!

gloesch commented 1 week ago

oh, and I'm not using the scripting addition. Is another variable.