Skip to content

add background blur on macos #6135

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

Closed
wants to merge 2 commits into from

Conversation

trivial-zero
Copy link

This is an attempt to add background blur to macos. I am not familiar to the code base and a little confused about how to properly read config. Any help would be appreciated. Here is a fixed blur radius preview:
image

@kovidgoyal
Copy link
Owner

This is a non-public API correct? And dont you have to set a color for the blur? window.backgroundColor IIRC

Not to mention there is no generally applicable solution for this on other platforms that I know of. I am not very keen to add platform specific features that anyway use a private API and so may stop working at any time.

As for your actual implementation, move it into kitty/cocoa_window.m then you can access the config value as simply OPT(whatever).

@page-down
Copy link
Contributor

page-down commented Mar 26, 2023

@BIKA-C

You should use NSVisualEffectView and set the blending mode instead of using the private API.

https://developer.apple.com/documentation/appkit/nsvisualeffectmaterial/nsvisualeffectmaterialunderwindowbackground

@hungvx-dev
Copy link

hungvx-dev commented Apr 28, 2023

@kovidgoyal @BIKA-C I'm looking forward to this feature.

@hungvx-dev
Copy link

hungvx-dev commented Apr 28, 2023

@BIKA-C @page-down

You can apply NSVisualEffectView to this PR.

@hungvx-dev
Copy link

@kovidgoyal You can update this PR and merge it for the next release. I very need this feature. Please help me.

@FormalSnake
Copy link

I need it too!

@hungvx-dev
Copy link

hungvx-dev commented Jun 8, 2023

@FormalSnake Yes. Because, when using background opacity is below 0.8 then it will be difficult to see, eyestrain. So we need a degree of blur @kovidgoyal

Screenshot 2023-06-08 at 10 36 44

@kovidgoyal
Copy link
Owner

Kindly stop spamming my inbox. I already stated my concerns with this PR no one has addressed them. Come up with a proper PR and we can discuss further.

@kovidgoyal kovidgoyal closed this Jun 8, 2023
Repository owner locked and limited conversation to collaborators Jun 8, 2023
@kovidgoyal kovidgoyal reopened this Jun 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants