Skip to content

Conversation

Lustyn
Copy link

@Lustyn Lustyn commented Sep 20, 2025

Description

This PR implements the basic functionality for "Liquid Glass" style background support (#8155). I used OpenCode (Claude 4) in some capacity to write this as I'm not super familiar with AppKit / SwiftUI. A good chunk of this I still needed to write by hand since Claude doesn't understand the Glass APIs, but I'm not 100% if the implementation here makes the best decisions since the practices in Ghostty config and separation of the AppKit code and SwiftUI seemed inconsistent to me.

Some of the combinations of options obviously create entirely unreadable terminals, but I've found that regular glass and transparent with opacity to be fairly readable. We don't enable this feature by default since it would of course break existing users setups.

Open Questions

  • How to determine the correct cornerRadius? For now this is eyeballed, I can't see any macOS public API or clearly documented constants.
  • Should boolean options be exposed for reasonable defaults?
  • Should the option need to be namespaced to macos-*?

Screenshots

0% Opacity, Regular
image
50% Opacity, Transparent
image
0% Opacity, Transparent
image

@Lustyn Lustyn requested a review from a team as a code owner September 20, 2025 05:52
@Aaron-212
Copy link
Contributor

How to determine the correct cornerRadius? For now this is eyeballed, I can't see any macOS public API or clearly documented constants.

https://www.reddit.com/r/MacOSBeta/comments/1lb2jt5/window_corner_radius_in_macos_tahoe_depends_on/
They are fixed. You can do a simple switch-case on the config macos-titlebar-style: 16pt for native, transparent and hidden, 20pt for tabs.

Should the option need to be namespaced to macos-*?

IMHO the config should not be limited to Liquid Glass effect. A better config name would be macos-background-style with following options:

  • default: uses regular blur
  • regular-glass and clear-glass: Liquid Glass effect (implemented by this PR)
  • other NSVisualEffectView styles

@Lustyn
Copy link
Author

Lustyn commented Sep 20, 2025

Thanks for the find on the corner radius!

I think vibrancy / NSVisualEffect is a good call out for how this feature should be structured. On the blur option I'm a bit unsure of since in the current state this allows users to mix glass, traditional blur, and opacity to achieve a little more readability.

(But if we have reasons we think mixing them is a no-no, that's ok!)

@Lustyn
Copy link
Author

Lustyn commented Sep 20, 2025

For now I've made standalone blur and the glass effects mutually exclusive, likewise I think the same would be true of NSVisualEffect if I understand correctly. My thoughts are that this will reduce confusion for people enabling the glass effect that already have a blur value set. A blur + glass merged mode or override might make more sense for users that actually intend on doing that?

@Lustyn Lustyn requested a review from a team as a code owner September 20, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants