diff --git a/internal/config/config.go b/internal/config/config.go index fc5d62ef1c361c4e4aae29a2683ed92c8e76fd9d..14b023f2df06207bb2c847f5f1e89d79b070c21d 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -130,6 +130,7 @@ type LSPConfig struct { type TUIOptions struct { CompactMode bool `json:"compact_mode,omitempty" jsonschema:"description=Enable compact mode for the TUI interface,default=false"` DiffMode string `json:"diff_mode,omitempty" jsonschema:"description=Diff mode for the TUI interface,enum=unified,enum=split"` + Transparent bool `json:"transparent,omitempty" jsonschema:"description=Enable transparent background for the TUI interface,default=false"` // Here we can add themes later or any TUI related options } diff --git a/internal/tui/tui.go b/internal/tui/tui.go index 2c935810b833af01c582866ec38d5f7b277bc203..de2c664c749f0a513161079f3e10a72be334d389 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -529,7 +529,9 @@ func (a *appModel) moveToPage(pageID page.PageID) tea.Cmd { func (a *appModel) View() tea.View { var view tea.View t := styles.CurrentTheme() - view.BackgroundColor = t.BgBase + if !a.app.Config().Options.TUI.Transparent { + view.BackgroundColor = t.BgBase + } if a.wWidth < 25 || a.wHeight < 15 { view.Layer = lipgloss.NewCanvas( lipgloss.NewLayer(