Skip to content

✨ feat: inherit Ghostty translucency, blur, and tmux cell opacity#55

Merged
vaayne merged 7 commits intomainfrom
feat/46-ghostty-theme-translucency-blur
Apr 12, 2026
Merged

✨ feat: inherit Ghostty translucency, blur, and tmux cell opacity#55
vaayne merged 7 commits intomainfrom
feat/46-ghostty-theme-translucency-blur

Conversation

@vaayne
Copy link
Copy Markdown
Owner

@vaayne vaayne commented Apr 12, 2026

Summary

  • inherit Ghostty background opacity, blur, and cell-opacity settings in Mori
  • apply Ghostty-style translucency/blur to the main workspace window and add macOS 26 glass polish for terminal content
  • improve tmux translucency behavior and reduce sync latency with debounced, deduplicated theme updates

Changes

  • extend GhosttyThemeInfo with background-opacity, background-opacity-cells, and background-blur
  • expose blur and cell-opacity controls in Settings and persist them back to Ghostty config
  • align workspace window translucency behavior with Ghostty lifecycle rules, including fullscreen/key-window refreshes
  • add a dedicated macOS 26 NSGlassEffectView background for terminal content when Ghostty glass styles are selected
  • make tmux avoid forcing opaque backgrounds when cell opacity is disabled
  • debounce and dedupe tmux theme sync work to make updates feel faster

Verification

  • swift build -c release --product Mori
  • mise run test

Closes #46.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 858dd53f1d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

backgroundOpacityCells: themeInfo.backgroundOpacityCells,
palette: themeInfo.palette.map(GhosttyThemeInfo.hexString)
)
guard await cache.shouldApply(payload) else { return }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include tmux backend identity in dedupe cache key

The new early return guard await cache.shouldApply(payload) only compares color payload and ignores which TmuxBackend is being configured, so theme sync is skipped for any second backend that shares the same theme values. This breaks multi-endpoint usage (local + SSH), because WorkspaceManager creates separate tmux backends per endpoint and each server must be configured at least once; with the current cache, the first successful apply can prevent later backends from receiving window-style, status-style, and related options.

Useful? React with 👍 / 👎.

Comment on lines +81 to +85
"Background blur" = "Background blur";
"Inherit Ghostty window blur and glass styling for translucent terminal backgrounds." = "Inherit Ghostty window blur and glass styling for translucent terminal backgrounds.";
"Background blur is only visible when background opacity is below 1.0." = "Background blur is only visible when background opacity is below 1.0.";
"Apply opacity to colored cells" = "Apply opacity to colored cells";
"Let tmux and terminal apps keep translucent backgrounds when they draw colored cells instead of using the default terminal background." = "Let tmux and terminal apps keep translucent backgrounds when they draw colored cells instead of using the default terminal background.";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Move new settings translations into MoriUI resource bundle

These new localization entries were added under the app target resources, but the new strings are consumed by GhosttySettingsView in MoriUI, where String.localized resolves from MoriUIResourceBundle. Because the keys are missing from Packages/MoriUI/Sources/MoriUI/Resources/*/Localizable.strings, the new blur/opacity labels and descriptions will not localize in the settings UI and will fall back to raw/default text.

Useful? React with 👍 / 👎.

@vaayne
Copy link
Copy Markdown
Owner Author

vaayne commented Apr 12, 2026

Addressed the review feedback in a follow-up commit:

  • scoped tmux theme dedupe cache per TmuxBackend instance so local/remote backends with the same theme still receive their own configuration
  • moved the new settings localization keys into MoriUI's resource bundle, and removed the duplicate app-target entries

Verification:

  • swift build -c release --product Mori
  • mise run test

Latest commit: a9e5c04

@vaayne vaayne merged commit f82f1ea into main Apr 12, 2026
4 checks passed
@vaayne vaayne deleted the feat/46-ghostty-theme-translucency-blur branch April 12, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: 主题个性化支持背景半透明,模糊这些(继承 ghostty 的配置)

1 participant