feat(tui): transparent mode

Carlos Alexandro Becker created

Optionally disable the bg color.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Change summary

internal/config/config.go | 1 +
internal/tui/tui.go       | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)

Detailed changes

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
 }
 

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(