opencode icon indicating copy to clipboard operation
opencode copied to clipboard

System them in macos with ghostty doesn't apply opacity

Open osmel-bsport opened this issue 2 months ago • 31 comments

Description

First of all thank you for the effort making opencode great. One regression I still see after system theme was shipped for the version 1.* is that it doesn't pick up the opacity at least in Ghostty.

OpenCode version

1.0.39

Steps to reproduce

  1. Open a ghostty terminal with config:
background-opacity = 0.9
background-blur-radius = 10
  1. Enter to opencode
  2. Select system theme

Screenshot and/or share link

Image

Operating System

mac os 26.0.1

Terminal

Ghostty

osmel-bsport avatar Nov 07 '25 08:11 osmel-bsport

This issue might be a duplicate of existing issues. Please check:

  • #1587: Both involve system theme not updating/applying properly and may require restart to work correctly

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Nov 07 '25 08:11 github-actions[bot]

same issue with alacritty on Linux no background transparency, old system theme prior to 1.0 did not have this issue

seaweeduk avatar Nov 07 '25 09:11 seaweeduk

Same issue on ghostty on mac.

FammasMaz avatar Nov 07 '25 11:11 FammasMaz

how can i enable it after this issue fixed ? like @joshmedeski does on wezterm , I haven't seen setting in previous issues or pull requests.

Image

jensenojs avatar Nov 08 '25 09:11 jensenojs

The system theme was dropped when the opentui version was released, hopefully we can add it back soon.

joshmedeski avatar Nov 10 '25 15:11 joshmedeski

Its already added now. Only the opacity is missing.

The system theme was dropped when the opentui version was released, hopefully we can add it back soon.

FammasMaz avatar Nov 10 '25 15:11 FammasMaz

w fix, I saw this after fighting with opencode for a hot second. I'm on 1.0.46 and I've set my default theme to be that of my system.

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

Apparently this is all you have to do and it should respect the transparency values you've set in ~/.config/ghostty/config

OfficialSerge avatar Nov 12 '25 00:11 OfficialSerge

wait so does it work?

thdxr avatar Nov 12 '25 02:11 thdxr

Image

no work in 1.0.58, wezterm

Image Image

jensenojs avatar Nov 12 '25 02:11 jensenojs

On ghostty 1.0.58 and it won't even respect my system theme on ghostty

khalid-talakshi avatar Nov 12 '25 02:11 khalid-talakshi

Transparency is not working in the "foot" terminal using the following values and opencode's system theme

[colors]
foreground=#cdd6f4
background=#11111b
alpha=0.8

This results in an opaque background in opencode

Sawangg avatar Nov 12 '25 14:11 Sawangg

@thdxr

https://github.com/sst/opencode/pull/4408#issue-3633037903

This fix looks like it resolved the issue. Please review it when you have time. Thank you for creating such a great product.


Before this PR is merged, you can temporarily use this theme as a substitute. move it to .config/opencode/themes, what it looks like

transparent.json

Image

jensenojs avatar Nov 17 '25 12:11 jensenojs

@thdxr

#4408 (comment)

This fix looks like it resolved the issue. Please review it when you have time. Thank you for creating such a great product.

Before this PR is merged, you can temporarily use this theme as a substitute. move it to .config/opencode/themes, what it looks like

transparent.json

Image

Found a new issue, the select item texts color use background color.

Image

luweiCN avatar Nov 18 '25 11:11 luweiCN

@thdxr #4408 (comment) This fix looks like it resolved the issue. Please review it when you have time. Thank you for creating such a great product. Before this PR is merged, you can temporarily use this theme as a substitute. move it to .config/opencode/themes, what it looks like transparent.json Image

Found a new issue, the select item texts color use background color.

Image
  • https://github.com/sst/opencode/pull/4408#issuecomment-3547003604

@luweiCN

jensenojs avatar Nov 18 '25 15:11 jensenojs

@luweiCN we fixed this you may just need to upgrade

rekram1-node avatar Nov 18 '25 19:11 rekram1-node

@luweiCN we fixed this you may just need to upgrade

I just tried, problem is still there.What I found is the selected item text color use background as its color. When I set red as background color, the selected item text color is red too.In this case, I set transparent as background color. Should it be more reasonable to use a new option to set selected item text color, like adding a selectedItemTextColor option?

luweiCN avatar Nov 19 '25 05:11 luweiCN

The original problem still exist, while the 0.* works perfectly

this is a screenshot using the latest version:

Image

osmel-bsport avatar Nov 19 '25 08:11 osmel-bsport

The original problem still exist, while the 0.* works perfectly

this is a screenshot using the latest version:

Image

I guess you did not change the theme config file, you need to set the background in the theme config file to transparent.Or you can use put this file transparent.json in ~/.config/opencode/themes, then start opencode /theme, and select transparent theme. These internal themes are not transparent theme, so you need to add a custom transparent theme to use this feature

luweiCN avatar Nov 19 '25 10:11 luweiCN

Same issue...its still opaque for me on ghostty with transparency. I tried the transparent.json linked here but the colors are off and most text is unreadable meaning id have to create a custom theme only for now? it doesnt inherit the default color scheme of my terminal.

Image

FammasMaz avatar Nov 19 '25 10:11 FammasMaz

the pr was reverted because of

  • https://github.com/sst/opencode/issues/4369

need to be fixed first

@osmel-bsport @FammasMaz

jensenojs avatar Nov 20 '25 11:11 jensenojs

wouldn't it be simpler for the default "theme" to not use colors at all ?

strk avatar Nov 26 '25 07:11 strk

Same issue...its still opaque for me on ghostty with transparency. I tried the transparent.json linked here but the colors are off and most text is unreadable meaning id have to create a custom theme only for now? it doesnt inherit the default color scheme of my terminal.

Image

off topic but can you share the ghostty config to achieve that tabs UI?

KeentGG avatar Dec 04 '25 02:12 KeentGG

@KeentGG that's the mac os Tahoe tabs :)

patrick91 avatar Dec 04 '25 16:12 patrick91

I can't even see the system theme on Ghostly (macOS) Tahoe.

m4kamran avatar Dec 05 '25 21:12 m4kamran

@m4kamran you have to manually type it into your config, it doesn't show up on the list for me either.

joshmedeski avatar Dec 05 '25 21:12 joshmedeski

Iv been lurking on this ticket for awhile since I really want this change. I took a look at it and at least for the background its pretty easy to alter the generateSystem function to default bg to transparent while that leaves all other settings the same. But that is not a valid solution for the long term.

  • We cannot by default set a transparent background for the system.
  • OpenTui cannot reliably detect if a terminal is running a transparent or blurred setting. So we get no values back there to help at runtime for the system styling.
  • We cannot bundle a transparent theme as there are required options that would make it no longer system styled.

If all of those are true, you need a new settings file field for theme overrides that would smoothly allow for small tweaks like this to any system or bundled theme. And to me that is a clean approach to this which I believe Zed ide does as well.

I hope that at least we can spark more conversation here in this ticket and come to a decision on the right direction for a solution to this problem.

dylanellington avatar Jan 07 '26 21:01 dylanellington

@KeentGG that's the mac os Tahoe tabs :)

oh thanks, i forgot i had it also but im using tmux instead of native tabs

KeentGG avatar Jan 08 '26 02:01 KeentGG

Following as I'm also seeing this issue using Ghostty 1.2.3 on Tahoe 26.0 despite trying the system theme.

Image

danaimone avatar Jan 11 '26 21:01 danaimone

Not working with Warp terminal in Macos, I am using opencode v 1.1.15 and Warp v0.2026.01.07.08.13.stable_01

wybert avatar Jan 13 '26 11:01 wybert

Iv been lurking on this ticket for awhile since I really want this change. I took a look at it and at least for the background its pretty easy to alter the generateSystem function to default bg to transparent while that leaves all other settings the same. But that is not a valid solution for the long term.

* We cannot by default set a transparent background for the system.

* OpenTui cannot reliably detect if a terminal is running a transparent or blurred setting. So we get no values back there to help at runtime for the system styling.

* We cannot bundle a transparent theme as there are required options that would make it no longer system styled.

If all of those are true, you need a new settings file field for theme overrides that would smoothly allow for small tweaks like this to any system or bundled theme. And to me that is a clean approach to this which I believe Zed ide does as well.

I hope that at least we can spark more conversation here in this ticket and come to a decision on the right direction for a solution to this problem.

@rekram1-node When you get time can you review my thoughts here so we can confirm whether or not we need a more detailed design and review to be in place to enhance theming as a whole in Opencode?

dylanellington avatar Jan 14 '26 21:01 dylanellington