menu

package
v0.0.0-...-b84ea05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2026 License: GPL-3.0, GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BannerStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle()
	})
	BannerSourceLabelStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Faint(true).MarginRight(1)
	})
	BannerSubItemStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Faint(true).MarginRight(1)
	})
	BannerSubStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle()
	})
	BannerSelfStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().MarginRight(1).Bold(true)
	})
	BannerPromptStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle()
	})
	BannerArgsStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().MarginLeft(1)
	})
	BannerArgStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle()
	})
	BannerTerminatorColor = lipgloss.Color("1")
	BannerTerminatorStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Faint(true).Foreground(BannerTerminatorColor)
	})
	BannerDryColor = lipgloss.Color("1")
	BannerDryStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Foreground(BannerDryColor).Bold(true).MarginRight(1)
	})
	BannerDefaultStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Faint(true).MarginLeft(1)
	})
)
View Source
var (
	CmdStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Faint(true)
	})
	CmdDirStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle()
	})
	CmdArgStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle()
	})
)
View Source
var (
	OverrideStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle()
	})
	OverrideCaretColor = lipgloss.Color("1")
	OverrideCaretStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Foreground(OverrideCaretColor).Bold(true)
	})
	OverrideTextStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Faint(true)
	})
)
View Source
var (
	PromptColor = lipgloss.Color("1")
	PromptStyle = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle()
		if !*flags.Yes {
			st.Foreground(PromptColor)
		}
		return st
	})
	ConfirmStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle()
	})
	AnswerStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle()
	})
	YesStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Faint(true)
	})
)
View Source
var (
	GitColor     = lipgloss.Color("4")
	GitInfoStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Background(GitColor).Border(lipgloss.OuterHalfBlockBorder(), false, false, false, true).BorderBackground(GitColor).Padding(0, 1)
	})
	GitStatusStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Bold(true).Background(GitColor).PaddingLeft(1)
	})
	GitAddColor = lipgloss.Color("2")
	GitAddStyle = style.New(func() lipgloss.Style {
		return GitStatusStyle.Get().Foreground(GitAddColor)
	})
	GitRemoveColor = lipgloss.Color("1")
	GitRemoveStyle = style.New(func() lipgloss.Style {
		return GitStatusStyle.Get().Foreground(GitRemoveColor)
	})
	GitChangeColor = lipgloss.Color("5")
	GitChangeStyle = style.New(func() lipgloss.Style {
		return GitStatusStyle.Get().Foreground(GitChangeColor)
	})
)
View Source
var (
	SourceStyle = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle()
		return st
	})
	SourceHeaderBackground = lipgloss.Color("5")
	SourceHeaderStyle      = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle()
		return st

	}).Debug()
	SourceLabelStyle = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle().Border(lipgloss.OuterHalfBlockBorder(), false, false, false, true).Background(SourceHeaderBackground).BorderBackground(SourceHeaderBackground).PaddingRight(1).PaddingLeft(1).MarginRight(1)
		return st

	})
	SourceTargetsStyle = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle()
		return st
	})
	SourcePathStyle = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle().Faint(true)
		return st
	})
	SourceIconStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Width(3)
	})
)
View Source
var (
	StateStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().MarginBottom(1)
	})
	MotdStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle().Faint(true).PaddingLeft(1)
	})
)
View Source
var (
	TargetBackgroundColor         = lipgloss.Color("8")
	SelectedTargetBackgroundColor = lipgloss.Color("2")
	TargetStyle                   = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle().Border(lipgloss.OuterHalfBlockBorder(), false, false, false, true)
		return st
	})
	TargetHighlightedColor = lipgloss.Color("1")
	TargetHighlightedStyle = style.New(func() lipgloss.Style {
		return TargetStyle.Get().Foreground(TargetHighlightedColor)
	})
	SelectedTargetStyle = style.New(func() lipgloss.Style {
		return TargetStyle.Get().BorderBackground(SelectedTargetBackgroundColor).Background(SelectedTargetBackgroundColor)
	})
	TargetLabelStyle = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle().MarginRight(1)
		return st
	})
	TargetDescriptionStyle = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle().Faint(true).MarginLeft(1)
		return st
	})
	SelectedTargetDescriptionStyle = style.New(func() lipgloss.Style {
		st := TargetDescriptionStyle.Get().Faint(false)
		return st
	})
	TargetIconStyle = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle().PaddingLeft(1)
		return st
	})
	TargetIconSelectedStyle = style.New(func() lipgloss.Style {
		return TargetIconStyle.Get().MarginLeft(1).PaddingLeft(0)
	})
	TargetSubStyle = style.New(func() lipgloss.Style {
		return lipgloss.NewStyle()
	})
	CategoryColor = lipgloss.Color("7")
	CategoryStyle = style.New(func() lipgloss.Style {
		return TargetStyle.Get().BorderForeground(CategoryColor).Background(CategoryColor).BorderBackground(CategoryColor)
	})
	OrphanCategoryStyle = style.New(func() lipgloss.Style {
		return TargetLabelStyle.Get().PaddingLeft(1)
	})
)
View Source
var ForcedInlineTerminals = map[string]string{
	"TERMINAL_EMULATOR": "JetBrains-JediTerm",
}
View Source
var (
	IconStyle = style.New(func() lipgloss.Style {
		st := lipgloss.NewStyle().Width(2).Height(1)
		return st
	})
)
View Source
var NoSourcesIndexedError = errors.New("no sources indexed")
View Source
var WrongModelTypeError = errors.New("wrong model type")

Functions

func Banner(source *model.Source, target model.Target, args ...string) string

func Confirm

func Confirm(r io.Reader, source *model.Source, target model.Target, args ...string) bool

func Git

func Git(info *model.GitInfo) string

func Hydrate

func Hydrate(st *model.State, hydrators []model.Modder) *model.HydratedState

func Icon

func Icon(input string) string

func InlineCmd

func InlineCmd(cmd *exec.Cmd) string

func OverrideWarning

func OverrideWarning(t model.Target) string

func PaddedIcon

func PaddedIcon(input string) string

Types

type Model

type Model struct {
	*model.HydratedState
	Index         int
	Indices       map[int]model.HydratedTarget
	SourceIndices map[int]*model.HydratedSource
	Cancel        bool
	Done          bool
	Height        int
	Alt           bool
	AutoAlt       bool
	Search        textinput.Model
	Motd          string
}

func NewModel

func NewModel(st *model.State, hydrators []model.Modder) *Model

func Show

func Show(st *model.State, hydrators []model.Modder) (*Model, error)

func (*Model) AddSearch

func (m *Model) AddSearch(croppedInput string) string

func (*Model) Category

func (m *Model) Category(input string, desc string) string

func (*Model) HandleInput

func (m *Model) HandleInput(msg tea.KeyMsg) (tea.Cmd, error)

func (*Model) HandleResize

func (m *Model) HandleResize(msg tea.WindowSizeMsg) tea.Cmd

func (*Model) HandleSignal

func (m *Model) HandleSignal(cmd tea.Cmd) (tea.Cmd, error)

func (*Model) Highlights

func (m *Model) Highlights(src *model.HydratedSource, t model.HydratedTarget) bool

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Leap

func (m *Model) Leap(direction int)

func (*Model) LeapFilter

func (m *Model) LeapFilter(direction int)

func (*Model) Result

func (m *Model) Result() (*model.HydratedSource, model.HydratedTarget)

func (*Model) Source

func (m *Model) Source(src *model.HydratedSource) string

func (*Model) State

func (m *Model) State() string

func (*Model) Target

func (m *Model) Target(src *model.HydratedSource, t model.HydratedTarget, header bool) string

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) Validate

func (m *Model) Validate() (clamped bool)

func (*Model) View

func (m *Model) View() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL