Fixing Opencode Transparency in Ghostty Terminal
文章介绍了解决Opencode在Ghostty终端运行时透明背景消失的问题。通过配置Opencode使用系统主题,使其适应终端的原生外观和透明度设置。 2025-7-18 12:0:0 Author: danielmiessler.com(查看原文) 阅读量:0 收藏

How to make Opencode respect your terminal's transparent background

July 18, 2025

Opencode with transparent Ghostty terminal

Opencode running with transparent background in Ghostty (click for full size)

If you're using Opencode in Ghostty terminal and noticed that your beautiful transparent background disappears when Opencode launches, here's the fix.

The Problem

Opencode's TUI doesn't honor Ghostty's transparent background by default, making the Opencode part of your terminal opaque when the app runs.

The Solution

Configure Opencode to use its system theme, which adapts to your terminal's native appearance including transparency.

Quick Fix

  1. Open your Opencode config:

    bash

    nvim ~/.config/opencode/opencode.json
  2. Set the theme to system:

    json

    {
      "$schema": "https://opencode.ai/config.json",
      "theme": "system"
    }
  3. Save the file

  4. Restart Opencode

Now your Opencode will seamlessly blend with your terminal's transparency settings.

Happy hacking!


文章来源: https://danielmiessler.com/blog/opencode-ghostty-transparency-fix?utm_source=rss&utm_medium=feed&utm_campaign=website
如有侵权请联系:admin#unsafe.sh