FelixKratz / JankyBorders

A lightweight window border system for macOS
GNU General Public License v3.0
1k stars 18 forks source link

Borders stop updating when move to newly created space #25

Closed albert-ying closed 9 months ago

albert-ying commented 9 months ago
ctrl + alt + shift - n : yabai -m space --create && \
                  index="$(yabai -m query --spaces --display | jq 'map(select(.))[-1].index')" && \
                  yabai -m window --space "${index}" && \
                  yabai -m space --focus "${index}" 

I have this in my skhd. After this command, the border for the given window stop updating (size and color)

albert-ying commented 9 months ago

moving window to space itself is fine -- but somehow when the space is created by yabai, something goes wrong.

FelixKratz commented 9 months ago

If I run the command

yabai -m space --create && \
                  index="$(yabai -m query --spaces --display | jq 'map(select(.))[-1].index')" && \
                  yabai -m window --space "${index}" && \
                  yabai -m space --focus "${index}"

from a kitty window it seems to work fine. Can you try to narrow down the problem more? I.e. try to run the command from your terminal directly with only one monitor etc.

Maybe this is some kind of race condition, can you try with this snippet

yabai -m space --create && sleep 0.5 && \
                  index="$(yabai -m query --spaces --display | jq 'map(select(.))[-1].index')" && \
                  yabai -m window --space "${index}" && \
                  yabai -m space --focus "${index}"
albert-ying commented 9 months ago

This is the screen recording. The second condition

https://github.com/FelixKratz/JankyBorders/assets/59846322/55ab5554-9d64-41c9-9c46-0e9d8ffe6604

gives the same result...

FelixKratz commented 9 months ago

Ok, then we need to dig even deeper.

Also, could you provide your yabairc?

albert-ying commented 9 months ago

Did you unload the WindowManager process? If so, stop doing so, reboot and test again

Oh yea -- it seems to be the reason! I had that in my .yabairc and after removing that and reloading, it works perfectly fine. Thank you!!!