yabai
yabai copied to clipboard
Question: Logic around border placement
Is there any reason why borders can not be placed around a window rather than being drawn on top of a window?
There could be a good reason why this is not possible, however if it was, it would be nice to have no overlap of text and borders on some apps
So there are a couple of reasons for this..
- It is not possible to match the corner radius/mask of a window, as there is no way for an external process to retrieve this value for an arbitrary application/window. See my comment here: https://github.com/koekeishiya/yabai/issues/715#issuecomment-727237643
You could of course inject code into every (GUI) process and modify the actual border property of the NSWindow instead, and it would match the corner radius.
-
Because we are unable to match the corner radius, the border would not fit the window shape if you attempt to place it around/outside the window. If you want to see this in practice, clone or download yabai tag v2.4.3 and set the border mode to exterior.
-
The «solution» would be to allow the user to specify a default border radius and ovverride per application through window rules, however to make this work, we need to enable hiDPI rendering (to achieve the same quality as the current version) and the RAM usage required by borders will increase by a large amount.
I don't think the current border system is perfect by any means, but for me it is a tradeoff between complexity and resources vs ease of use and benefit. I would rather have an acceptable, but subpar solution, than a complex solution that require a lot of manual tweaking to look good. There is a fine line between providing user customization possibilities and making something actual usable.
Whether or not these are good reasons is a subjective opinion and I don't expect everyone to agree, but such is life.
Sent from my iPhone
On 16 Aug 2021, at 16:29, Jordan Pyott @.***> wrote:
Is there any reason why borders can not be placed around a window rather than being drawn on top of a window?
There could be a good reason why this is not possible, however if it was, it would be nice to have no overlap of text and borders on some apps
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/koekeishiya/yabai/issues/984, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABPDZV3WBHSMDDIRKY2YFJTT5EOEXANCNFSM5CH3CTSQ.
@koekeishiya I totally understand your decisions regarding the window borders. Is it difficult/a lot of work to simply have a config option for a border radius + an option for placement on the exterior of the window? Much like how you had without limelight? I don't really about the border radius matching every window perfectly, but being able to set a constant radius, and address the issue of having thicker borders drawn over the content of the window would be amazing.
Thanks for Yabai. It makes my MacOS experience so much more enjoyable ❤️
not trying to be nit-picky, but it seems that the border is consistently 1 pixel within the window border no matter how thick i make the width. Is there a setting to fix that?
What you are seeing is not actually the window border, it is the window shadow. You can confirm this by running yabai -m config window_shadow off
, assuming you have the scripting-addition installed.
ah okay that fixed it, thank you! also, i was wondering why some apps(safari, vscode) dont respond to window swap or window zoom-fullscreen. is there a reason for that?
Not really sure what that could be. Both work fine for me. Maybe they are being treated as floating for some reason?
Make sure they are not assigned to "all desktops" as shown here:
hmm, there're both assigned to None. is there any way to treat them as tiles?
This will be fixed with the changes being made for #1430