diff options
| author | adamelmore <[email protected]> | 2025-07-21 08:56:45 -0500 |
|---|---|---|
| committer | adamelmore <[email protected]> | 2025-07-21 10:02:57 -0500 |
| commit | bb17d14665de1c240249ce33dd18fb9e0ae463b9 (patch) | |
| tree | 20af47d9c4681cc4db7e066e8e28618d904209aa /packages | |
| parent | cd0b2ae0323aa36d3e15b94d8ec9ca0bb81b5597 (diff) | |
| download | opencode-bb17d14665de1c240249ce33dd18fb9e0ae463b9.tar.gz opencode-bb17d14665de1c240249ce33dd18fb9e0ae463b9.zip | |
feat(tui): theme override with OPENCODE_THEME
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/tui/cmd/opencode/main.go | 2 | ||||
| -rw-r--r-- | packages/tui/internal/app/app.go | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/packages/tui/cmd/opencode/main.go b/packages/tui/cmd/opencode/main.go index 73fd37ed9..8e387d21b 100644 --- a/packages/tui/cmd/opencode/main.go +++ b/packages/tui/cmd/opencode/main.go @@ -70,7 +70,6 @@ func main() { }() // Create main context for the application - app_, err := app.New(ctx, version, appInfo, modes, httpClient, model, prompt, mode) if err != nil { panic(err) @@ -79,7 +78,6 @@ func main() { program := tea.NewProgram( tui.NewModel(app_), tea.WithAltScreen(), - // tea.WithKeyboardEnhancements(), tea.WithMouseCellMotion(), ) diff --git a/packages/tui/internal/app/app.go b/packages/tui/internal/app/app.go index a481cd101..0c90257b3 100644 --- a/packages/tui/internal/app/app.go +++ b/packages/tui/internal/app/app.go @@ -3,6 +3,7 @@ package app import ( "context" "fmt" + "os" "path/filepath" "sort" "strings" @@ -103,6 +104,10 @@ func New( if configInfo.Theme != "" { appState.Theme = configInfo.Theme } + themeEnv := os.Getenv("OPENCODE_THEME") + if themeEnv != "" { + appState.Theme = themeEnv + } var modeIndex int var mode *opencode.Mode |
