diff --git a/config/config.go b/config/config.go index da2d699..1fede29 100644 --- a/config/config.go +++ b/config/config.go @@ -45,6 +45,8 @@ type Config struct { Browser string RenderShadows bool RenderImages bool + RenderSplash bool + RenderBanner bool Systems []SystemConfig @@ -192,6 +194,8 @@ func SetDefaults(cacheDir string) { viper.SetDefault("RenderShadows", "true") viper.SetDefault("RenderImages", "true") + viper.SetDefault("RenderSplash", "true") + viper.SetDefault("RenderBanner", "true") // --- Header --- // Header Selector diff --git a/ui/header/header.go b/ui/header/header.go index 36f2cec..f157609 100644 --- a/ui/header/header.go +++ b/ui/header/header.go @@ -111,6 +111,10 @@ func (m Model) View() string { spinner = m.spinner.View() } + if !m.ctx.Config.RenderBanner{ + banner = "" + } + row = lipgloss.JoinHorizontal(lipgloss.Bottom, banner, " ", diff --git a/ui/views/splash/splash.go b/ui/views/splash/splash.go index 2bb9e3f..238eaf5 100644 --- a/ui/views/splash/splash.go +++ b/ui/views/splash/splash.go @@ -33,6 +33,9 @@ func NewModel(c *ctx.Ctx) Model { ctx: c, pix: nil, } + if !m.ctx.Config.RenderSplash { + return m + } m.splashscreen, err = m.ctx.EmbedFS.ReadFile("splashscreen.png") if err != nil { @@ -74,7 +77,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { func (m *Model) sleep() tea.Cmd { return func() tea.Msg { - time.Sleep(time.Second * 5) + if m.ctx.Config.RenderSplash { + time.Sleep(time.Second * 5) + } c := cmd.New( cmd.ViewOpen,