diff --git a/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift b/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift index 9aa8ec2eb..c0aad46b3 100644 --- a/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift +++ b/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift @@ -143,6 +143,10 @@ class TitlebarTabsVenturaTerminalWindow: TerminalWindow { override func syncAppearance(_ surfaceConfig: Ghostty.SurfaceView.DerivedConfig) { super.syncAppearance(surfaceConfig) + // override appearance based on the terminal's background color + if let preferredBackgroundColor { + appearance = (preferredBackgroundColor.isLightColor ? NSAppearance(named: .aqua) : NSAppearance(named: .darkAqua)) + } // Update our window light/darkness based on our updated background color let themeChanged = isLightTheme != OSColor(surfaceConfig.backgroundColor).isLightColor diff --git a/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift b/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift index 7ae628341..08d56c83d 100644 --- a/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift +++ b/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift @@ -59,6 +59,10 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { override func syncAppearance(_ surfaceConfig: Ghostty.SurfaceView.DerivedConfig) { super.syncAppearance(surfaceConfig) + // override appearance based on the terminal's background color + if let preferredBackgroundColor { + appearance = (preferredBackgroundColor.isLightColor ? NSAppearance(named: .aqua) : NSAppearance(named: .darkAqua)) + } // Save our config in case we need to reapply lastSurfaceConfig = surfaceConfig diff --git a/src/config/Config.zig b/src/config/Config.zig index c9ae121e4..505381977 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -1765,7 +1765,7 @@ keybind: Keybinds = .{}, /// * `ghostty` - Use the background and foreground colors specified in the /// Ghostty configuration. This is only supported on Linux builds. /// -/// On macOS, if `macos-titlebar-style` is "tabs", the window theme will be +/// On macOS, if `macos-titlebar-style` is `tabs` or `transparent`, the window theme will be /// automatically set based on the luminosity of the terminal background color. /// This only applies to terminal windows. This setting will still apply to /// non-terminal windows within Ghostty.