Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve window borders #1430

Closed
koekeishiya opened this issue Sep 20, 2022 · 17 comments
Closed

improve window borders #1430

koekeishiya opened this issue Sep 20, 2022 · 17 comments
Labels
suggestion Request for new feature or some form of enhancement

Comments

@koekeishiya
Copy link
Owner

koekeishiya commented Sep 20, 2022

Borders should be placed below and outside the window, corners rounded, and have a filled blur so that it acts as a backdrop for windows that have modified opacity.

Edit: Added border commands:

window_border_hidpi [<BOOL_SEL>]
    Draw border in high resolution mode; for High Dots Per Inch ("Retina") displays.
    HiDPI uses significantly more memory.

window_border_blur [<BOOL_SEL>]
    Blur border allowing it to act as a backdrop for transparent windows.

window_border_radius [<integer number>]
    Radius of window border.
@koekeishiya
Copy link
Owner Author

Implemented on the animate branch, which is scheduled for the next release.

@jonatan-branting
Copy link

jonatan-branting commented Sep 22, 2022

Absolutely great work on the new border system.

The only part of borders which does not feel "native" to me now is when animating to mission control. This will leave the borders where they are before the windows are scaled and moved. The borders will then disappear once the animation has finished.

Is it at all possible to remove the borders at the start of the animation as opposed to the end of the animation?

@koekeishiya
Copy link
Owner Author

koekeishiya commented Sep 22, 2022

Unfortunately, the technique I used in macOS Big Sur to detect mission control activating (pre-animation) was (unintentionally?) gated by Apple in macOS Monterey, so as of now this is the only way I know of.

@koekeishiya
Copy link
Owner Author

koekeishiya commented Sep 22, 2022

Just for documentation purposes; this is the disassembly of the function that was added in the WindowServer that I believe broke the Big Sur solution in Monterey. I haven't spent a huge amount of time looking into this, so I could very well be wrong, and there is some other reason.

Screenshot 2022-09-22 at 23 06 18

@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Sep 23, 2022
Amar1729 added a commit to Amar1729/yabai-zsh-completions that referenced this issue Sep 26, 2022
@mil-ad
Copy link

mil-ad commented Sep 26, 2022

Is there a way to get the old behaviour back? I used borders to hide the ugly rounded corners in macOS and it's not possible with the new behaviour.

@pankamyk
Copy link

pankamyk commented Sep 26, 2022

@mil-ad You can just edit your SystemAppearance.bundle and change the default Mac corner style.

@shot-codes
Copy link

@pankamyk How does one go about doing that? I have a bunch of .car files that I cannot edit

@pankamyk
Copy link

@s-h-o-t You'll need to disable SIP, mount sys volume disc as writeable, use an app like https://github.com/jslegendre/ThemeEngine to edit your files, and then bless the livemount

@mil-ad
Copy link

mil-ad commented Sep 26, 2022

@mil-ad You can just edit your SystemAppearance.bundle and change the default Mac corner style.

I was wondering if it's possible to get the old yabai behaviour back

@isaacraja
Copy link

@mil-ad - window_border_radius = 0; works partially though. The border is squared but the window edges are still rounded

@PaddiM8
Copy link

PaddiM8 commented Nov 1, 2022

Would it not be possible to have an option for choosing the border style?

@M4cs
Copy link

M4cs commented Nov 9, 2022

@mil-ad You can just edit your SystemAppearance.bundle and change the default Mac corner style.

Which .car file and asset do you edit for this?

@mil-ad
Copy link

mil-ad commented Nov 9, 2022

Which .car file and asset do you edit for this?
please let me know if you find out

@pankamyk
Copy link

pankamyk commented Nov 9, 2022

@M4cs @mil-ad Aqua or DarkAqua, depending on which system theme you're using

@pankamyk
Copy link

pankamyk commented Nov 9, 2022

If I remember correctly, the exact asset in those files that's responsible for shaped edges is WindowFrame_WindowShapeEdges

@tsujp
Copy link
Contributor

tsujp commented Nov 25, 2022

I pre-made bundles for this specifically for borders with Yabai back in the day: https://github.com/tsujp/customise_macos

@tsujp
Copy link
Contributor

tsujp commented Nov 25, 2022

On macOS 12 onwards it's harder to replace the files you need to do (although the patches provided should be fine), I link to instructions for this here: tsujp/customise_macos#9 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Request for new feature or some form of enhancement
Projects
None yet
Development

No branches or pull requests

9 participants