Documentation
¶
Index ¶
- Variables
- func Banner(source *model.Source, target model.Target, args ...string) string
- func Confirm(r io.Reader, source *model.Source, target model.Target, args ...string) bool
- func Git(info *model.GitInfo) string
- func Hydrate(st *model.State, hydrators []model.Modder) *model.HydratedState
- func Icon(input string) string
- func InlineCmd(cmd *exec.Cmd) string
- func OverrideWarning(t model.Target) string
- func PaddedIcon(input string) string
- type Model
- func (m *Model) AddSearch(croppedInput string) string
- func (m *Model) Category(input string, desc string) string
- func (m *Model) HandleInput(msg tea.KeyMsg) (tea.Cmd, error)
- func (m *Model) HandleResize(msg tea.WindowSizeMsg) tea.Cmd
- func (m *Model) HandleSignal(cmd tea.Cmd) (tea.Cmd, error)
- func (m *Model) Highlights(src *model.HydratedSource, t model.HydratedTarget) bool
- func (m *Model) Init() tea.Cmd
- func (m *Model) Leap(direction int)
- func (m *Model) LeapFilter(direction int)
- func (m *Model) Result() (*model.HydratedSource, model.HydratedTarget)
- func (m *Model) Source(src *model.HydratedSource) string
- func (m *Model) State() string
- func (m *Model) Target(src *model.HydratedSource, t model.HydratedTarget, header bool) string
- func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Model) Validate() (clamped bool)
- func (m *Model) View() string
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 OverrideWarning ¶
func PaddedIcon ¶
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 (*Model) HandleResize ¶
func (m *Model) HandleResize(msg tea.WindowSizeMsg) tea.Cmd
func (*Model) Highlights ¶
func (m *Model) Highlights(src *model.HydratedSource, t model.HydratedTarget) bool
func (*Model) LeapFilter ¶
func (*Model) Result ¶
func (m *Model) Result() (*model.HydratedSource, model.HydratedTarget)
func (*Model) Target ¶
func (m *Model) Target(src *model.HydratedSource, t model.HydratedTarget, header bool) string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.