Documentation
¶
Overview ¶
Package app provides the main application UI and logic using Bubble Tea.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetIconProvider ¶ added in v1.27.0
func SetIconProvider(p IconProvider)
SetIconProvider sets the current icon provider.
Types ¶
type CommandRunner ¶ added in v1.30.0
CommandRunner is a function type for creating exec.Cmd instances.
type EmojiProvider ¶ added in v1.27.0
type EmojiProvider struct{}
EmojiProvider implements IconProvider using emojis.
func (*EmojiProvider) GetCIIcon ¶ added in v1.27.0
func (p *EmojiProvider) GetCIIcon(conclusion string) string
GetCIIcon returns the CI status icon for the given conclusion.
func (*EmojiProvider) GetFileIcon ¶ added in v1.27.0
func (p *EmojiProvider) GetFileIcon(name string, isDir bool) string
GetFileIcon returns the file icon for the given name and type.
func (*EmojiProvider) GetIssueIcon ¶ added in v1.27.0
func (p *EmojiProvider) GetIssueIcon() string
GetIssueIcon returns the issue icon.
func (*EmojiProvider) GetPRIcon ¶ added in v1.27.0
func (p *EmojiProvider) GetPRIcon() string
GetPRIcon returns the PR icon.
func (*EmojiProvider) GetUIIcon ¶ added in v1.27.0
func (p *EmojiProvider) GetUIIcon(icon UIIcon) string
GetUIIcon returns the UI icon for the given identifier.
type ITermLauncher ¶ added in v1.32.0
type ITermLauncher struct {
// contains filtered or unexported fields
}
ITermLauncher implements TerminalTabLauncher for iTerm.
func (*ITermLauncher) IsAvailable ¶ added in v1.32.0
func (i *ITermLauncher) IsAvailable() bool
IsAvailable checks if running inside iTerm.
func (*ITermLauncher) Launch ¶ added in v1.32.0
func (i *ITermLauncher) Launch(ctx context.Context, cmd, cwd, title string, env map[string]string) (string, error)
Launch opens a new iTerm tab with the given command.
func (*ITermLauncher) Name ¶ added in v1.32.0
func (i *ITermLauncher) Name() string
Name returns "iTerm".
type IconProvider ¶ added in v1.27.0
type IconProvider interface {
GetFileIcon(name string, isDir bool) string
GetPRIcon() string
GetIssueIcon() string
GetCIIcon(conclusion string) string
GetUIIcon(icon UIIcon) string
}
IconProvider defines the interface for providing icons.
type KittyLauncher ¶ added in v1.30.0
type KittyLauncher struct {
// contains filtered or unexported fields
}
KittyLauncher implements TerminalTabLauncher for Kitty terminal.
func (*KittyLauncher) IsAvailable ¶ added in v1.30.0
func (k *KittyLauncher) IsAvailable() bool
IsAvailable checks if running inside Kitty terminal.
func (*KittyLauncher) Launch ¶ added in v1.30.0
func (k *KittyLauncher) Launch(ctx context.Context, cmd, cwd, title string, env map[string]string) (string, error)
Launch opens a new Kitty tab with the given command.
func (*KittyLauncher) Name ¶ added in v1.30.0
func (k *KittyLauncher) Name() string
Name returns "Kitty".
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the main application model
func NewModel ¶
NewModel creates a new application model with the given configuration. initialFilter is an optional filter string to apply on startup.
func (*Model) Close ¶
func (m *Model) Close()
Close releases background resources including canceling contexts and timers. It also persists the current selection for the next session.
func (*Model) GetSelectedPath ¶
GetSelectedPath returns the selected worktree path for shell integration. This is used when the application exits to allow the shell to cd into the selected worktree.
func (*Model) UpdateTheme ¶ added in v1.22.0
UpdateTheme refreshes UI styles for the selected theme.
type NerdFontV3Provider ¶ added in v1.27.0
type NerdFontV3Provider struct{}
NerdFontV3Provider implements IconProvider for Nerd Font v3.
func (*NerdFontV3Provider) GetCIIcon ¶ added in v1.27.0
func (p *NerdFontV3Provider) GetCIIcon(conclusion string) string
GetCIIcon returns the CI status icon for the given conclusion.
func (*NerdFontV3Provider) GetFileIcon ¶ added in v1.27.0
func (p *NerdFontV3Provider) GetFileIcon(name string, isDir bool) string
GetFileIcon returns the file icon for the given name and type.
func (*NerdFontV3Provider) GetIssueIcon ¶ added in v1.27.0
func (p *NerdFontV3Provider) GetIssueIcon() string
GetIssueIcon returns the issue icon.
func (*NerdFontV3Provider) GetPRIcon ¶ added in v1.27.0
func (p *NerdFontV3Provider) GetPRIcon() string
GetPRIcon returns the PR icon.
func (*NerdFontV3Provider) GetUIIcon ¶ added in v1.27.0
func (p *NerdFontV3Provider) GetUIIcon(icon UIIcon) string
GetUIIcon returns the UI icon for the given identifier.
type StatusFile ¶ added in v1.15.0
type StatusFile = models.StatusFile
StatusFile represents a file entry from git status.
type StatusTreeNode ¶ added in v1.17.0
type StatusTreeNode = services.StatusTreeNode
StatusTreeNode represents a node in the status file tree (directory or file).
type TerminalTabLauncher ¶ added in v1.30.0
type TerminalTabLauncher interface {
// Name returns the terminal name for display.
Name() string
// IsAvailable checks if running inside this terminal.
IsAvailable() bool
// Launch opens a new tab with the given command.
// Returns the tab title on success.
Launch(ctx context.Context, cmd, cwd, title string, env map[string]string) (string, error)
}
TerminalTabLauncher launches commands in new terminal tabs.
type TextProvider ¶ added in v1.27.0
type TextProvider struct{}
TextProvider implements IconProvider using simple Unicode-safe characters.
func (*TextProvider) GetCIIcon ¶ added in v1.27.0
func (p *TextProvider) GetCIIcon(conclusion string) string
GetCIIcon returns the CI status icon for the given conclusion.
func (*TextProvider) GetFileIcon ¶ added in v1.27.0
func (p *TextProvider) GetFileIcon(name string, isDir bool) string
GetFileIcon returns the file icon for the given name and type.
func (*TextProvider) GetIssueIcon ¶ added in v1.27.0
func (p *TextProvider) GetIssueIcon() string
GetIssueIcon returns the issue icon.
func (*TextProvider) GetPRIcon ¶ added in v1.27.0
func (p *TextProvider) GetPRIcon() string
GetPRIcon returns the PR icon.
func (*TextProvider) GetUIIcon ¶ added in v1.27.0
func (p *TextProvider) GetUIIcon(icon UIIcon) string
GetUIIcon returns the UI icon for the given identifier.
type UIIcon ¶ added in v1.27.0
type UIIcon int
UIIcon identifies UI-specific icons that follow the selected icon set.
const ( UIIconHelpTitle UIIcon = iota UIIconStatusPane UIIconLogPane UIIconCommitTree UIIconWorktreeActions UIIconBranchNaming UIIconViewingTools UIIconRepoOps UIIconBackgroundRefresh UIIconFilterSearch UIIconStatusIndicators UIIconShellCompletion UIIconConfiguration UIIconIconConfiguration UIIconTip UIIconSearch UIIconFilter UIIconZoom UIIconBot UIIconThemeSelect UIIconPRSelect UIIconIssueSelect UIIconCICheck UIIconWorktreeMain UIIconWorktree UIIconStatusClean UIIconStatusDirty UIIconSyncClean UIIconAhead UIIconBehind UIIconArrowLeft UIIconArrowRight UIIconDisclosureOpen UIIconDisclosureClosed UIIconSpinnerFilled UIIconSpinnerEmpty UIIconPRStateOpen UIIconPRStateMerged UIIconPRStateClosed UIIconPRStateUnknown )
UIIcon values map UI elements to icon set glyphs.
type WezTermLauncher ¶ added in v1.32.0
type WezTermLauncher struct {
// contains filtered or unexported fields
}
WezTermLauncher implements TerminalTabLauncher for WezTerm terminal.
func (*WezTermLauncher) IsAvailable ¶ added in v1.32.0
func (w *WezTermLauncher) IsAvailable() bool
IsAvailable checks if running inside WezTerm.
func (*WezTermLauncher) Launch ¶ added in v1.32.0
func (w *WezTermLauncher) Launch(ctx context.Context, cmd, cwd, title string, env map[string]string) (string, error)
Launch opens a new WezTerm tab with the given command.
func (*WezTermLauncher) Name ¶ added in v1.32.0
func (w *WezTermLauncher) Name() string
Name returns "WezTerm".
Source Files
¶
- app.go
- app_diff.go
- app_external.go
- app_git.go
- app_helpers.go
- app_nav.go
- app_screens.go
- app_status.go
- auto_refresh.go
- base_selection.go
- ci.go
- devicons.go
- handlers.go
- helpers.go
- layout.go
- lazygit_file_icons.go
- messages.go
- multiplexer.go
- render_components.go
- render_panes.go
- renderer.go
- screen_icon_bridge.go
- selection_types.go
- state_aliases.go
- terminal_tab.go
- worktree_operations.go
- worktree_selection.go
- worktree_sync.go