Documentation
¶
Overview ¶
Package tui provides a Bubbletea-based TUI for the fsck command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FsckPanelUpdateCmd ¶
FsckPanelUpdateCmd returns a Cmd which Bubbletea can execute in order to retrieve and updateMsg.
func LayerProgressKey ¶
func LayerProgressKey() string
LayerProgressKey returns a rendered "key" which can be used in the UI to visually explain to the user which fsck state is associated with the various styles.
Types ¶
type FsckPanel ¶
type FsckPanel struct {
// contains filtered or unexported fields
}
FsckPanel represents the UI model for the FSCK TUI.
func NewFsckPanel ¶
func NewFsckPanel() *FsckPanel
NewFsckPanel creates a new TUI panel showing information about an ongoing fsck operation.
type FsckPanelUpdateMsg ¶
FsckPanelUpdateMsg is used to tell the FsckPanel about updated status from the fsck operation.
type LayerProgressModel ¶
type LayerProgressModel struct {
// PercentageStyle controls how the progress percentage is rendered.
PercentageStyle lipgloss.Style
// LabelStyle controls how the label string is rendered.
LabelStyle lipgloss.Style
// contains filtered or unexported fields
}
LayerProgressModel is the UI model for a progress bar which represents fsck status through a paricular level of the tree.
func NewLayerProgressBar ¶
func NewLayerProgressBar(label string, width int, level int) *LayerProgressModel
NewLayerProgressBar returns a progress bar which can render information about the states of fsck ranges.
Label is the name of the range, and will be shown in the UI. width is the total width available to this model.
func (*LayerProgressModel) Init ¶
func (m *LayerProgressModel) Init() tea.Cmd
func (*LayerProgressModel) Update ¶
Update is used to animate the progress bar during transitions. Use SetPercent to create the command you'll need to trigger the animation.
If you're rendering with ViewAs you won't need this.
func (*LayerProgressModel) View ¶
func (m *LayerProgressModel) View() string
type LayerUpdateMsg ¶
LayerUpdateMsg is a message which carries information for a specific layer in the tree (e.g. tiles for a specific level).
type StatsViewModel ¶
type StatsViewModel struct {
// contains filtered or unexported fields
}
StatsViewModel is the UI model for a stats widget.
func NewStatsView ¶
func NewStatsView() *StatsViewModel
NewStatsView returns a widet which displays fsck statistics.
func (*StatsViewModel) Init ¶
func (m *StatsViewModel) Init() tea.Cmd
func (*StatsViewModel) View ¶
func (m *StatsViewModel) View() string