Fixing Opencode Transparency in Ghostty Terminal
When running Opencode in Ghostty terminal, the transparent background disappears, but there is a fix for this issue. The problem is that Opencode's TUI doesn't honor Ghostty's transparent background by default, making the Opencode part of the terminal opaque. To fix this, you need to configure Opencode to use its system theme, which adapts to your terminal's native appearance, including transparency. To do this, create the file structure if it doesn't exist and open your Opencode config file. In the config file, set the theme to "system" and save the file. Then, restart Opencode and it will use the system theme, which includes transparency. This fix works by using "none" for the background. With this fix, Opencode will seamlessly blend with your terminal's transparency settings. This solution also works for other terminals with transparency, such as Alacritty or iTerm2. By applying this fix, you can enjoy a transparent background in Opencode, as shown in the example with the tokyonight theme.