Skip to content
Open
22 changes: 15 additions & 7 deletions cmd/ktea/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var kconnectTab = tab.Tab{Title: "Kafka Connect", Label: kconnectTabLbl}
var clustersTab = tab.Tab{Title: "Clusters", Label: clustersTabLbl}

type Model struct {
logoless bool
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe call this hideLogo?

tabs tab.Model
activeTab tab.Tab
tabCtrl tabs.TabController
Expand Down Expand Up @@ -82,8 +83,10 @@ func (m *Model) View() string {
}

var views []string
logoView := m.renderer.Render(" ___ \n |/ | _ _.\n |\\ | (/_ (_| " + version)
views = append(views, logoView)
if !m.logoless {
logoView := m.renderer.Render(" ___ \n |/ | _ _.\n |\\ | (/_ (_| " + version)
views = append(views, logoView)
}

tabsView := m.tabs.View(m.ktx, m.renderer)
views = append(views, tabsView)
Expand Down Expand Up @@ -336,9 +339,11 @@ func main() {
var (
debugParam bool
plainFontsParam bool
logoless bool
)
flag.BoolVar(&debugParam, "debug", false, "enable debug")
flag.BoolVar(&plainFontsParam, "plain-fonts", false, "disable NerdFonts (if you see weird icons)")
flag.BoolVar(&logoless, "logoless", false, "start ktea without logo")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also call this hide-logo? so the param becomes -hide-logo

flag.Parse()

plainFontParamSet := false
Expand All @@ -353,12 +358,15 @@ func main() {
disableNerdFonts = &plainFontsParam
}

m := NewModel(
disableNerdFonts,
kadmin.SaramaInstantiator(),
config.NewDefaultIO(),
)
m.logoless = logoless
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is time to add some kind of configuration struct to bundle all configuration options like this one and disableNerdFonts


p := tea.NewProgram(
NewModel(
disableNerdFonts,
kadmin.SaramaInstantiator(),
config.NewDefaultIO(),
),
m,
tea.WithAltScreen(),
)

Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ replace github.com/charmbracelet/huh v0.6.0 => github.com/jonas-grgt/huh v0.0.0-
replace github.com/riferrei/srclient v0.7.1 => github.com/jonas-grgt/srclient v0.0.0-20250817105441-619805bcbd5b

require (
github.com/IBM/sarama v1.45.1
github.com/IBM/sarama v1.46.3
github.com/alecthomas/chroma/v2 v2.20.0
github.com/atotto/clipboard v0.1.4
github.com/burdiyan/kafkautil v0.0.0-20240215092415-7e6d3d0fc870
github.com/charmbracelet/bubbles v0.20.1-0.20250305115717-cdc743f1f488
github.com/charmbracelet/bubbletea v1.3.10
github.com/charmbracelet/huh v0.6.0
github.com/charmbracelet/lipgloss v1.1.0
github.com/charmbracelet/log v0.4.0
github.com/charmbracelet/log v0.4.2
github.com/charmbracelet/x/ansi v0.10.1
github.com/docker/go-connections v0.5.0
github.com/dustin/go-humanize v1.0.1
github.com/google/uuid v1.6.0
github.com/linkedin/goavro/v2 v2.13.1
github.com/linkedin/goavro/v2 v2.14.1
github.com/muesli/reflow v0.3.0
github.com/pkg/errors v0.9.1
github.com/riferrei/srclient v0.7.1
github.com/segmentio/kafka-go v0.4.47
github.com/stretchr/testify v1.10.0
github.com/segmentio/kafka-go v0.4.49
github.com/stretchr/testify v1.11.1
github.com/testcontainers/testcontainers-go v0.38.0
github.com/testcontainers/testcontainers-go/modules/compose v0.38.0
github.com/testcontainers/testcontainers-go/modules/kafka v0.34.0
Expand Down Expand Up @@ -142,7 +142,7 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/compress v1.18.1 // indirect
github.com/lovoo/goka v1.1.14 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
Expand Down Expand Up @@ -192,7 +192,7 @@ require (
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/r3labs/sse v0.0.0-20210224172625-26fe804710bc // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect
Expand Down Expand Up @@ -237,14 +237,14 @@ require (
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/mock v0.5.2 // indirect
golang.org/x/crypto v0.37.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/crypto v0.43.0 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.46.0 // indirect
golang.org/x/oauth2 v0.28.0 // indirect
golang.org/x/sync v0.13.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/term v0.31.0 // indirect
golang.org/x/text v0.24.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/term v0.36.0 // indirect
golang.org/x/text v0.30.0 // indirect
golang.org/x/time v0.6.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
Expand Down
Loading