diff --git a/cmd/root.go b/cmd/root.go index 5e74d06..c2de197 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -150,7 +150,9 @@ func milkbucket(cmd *cobra.Command, args []string) { } defer m.destroy() - m.loadPreset(false) + if len(args) > 0 { + m.loadPreset(false) + } running := true for running { diff --git a/cmd/window.go b/cmd/window.go index 8f16aa5..b2fa4fa 100644 --- a/cmd/window.go +++ b/cmd/window.go @@ -67,8 +67,10 @@ func (m *milkDropWindow) setupPresets(presets []string) { * preset. */ func (m *milkDropWindow) nextPreset(smooth bool) { - m.preset = m.preset.Next() - m.loadPreset(smooth) + if m.preset.Len() > 0 { + m.preset = m.preset.Next() + m.loadPreset(smooth) + } } /* @@ -76,8 +78,10 @@ func (m *milkDropWindow) nextPreset(smooth bool) { * preset. */ func (m *milkDropWindow) prevPreset(smooth bool) { - m.preset = m.preset.Prev() - m.loadPreset(smooth) + if m.preset.Len() > 0 { + m.preset = m.preset.Prev() + m.loadPreset(smooth) + } } /*