tasklist

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(tasks []*taskboard.Task, cursor int, width int) string

Render renders the task list view.

Types

type KeyMap

type KeyMap struct {
	Up     key.Binding
	Down   key.Binding
	Enter  key.Binding
	Delete key.Binding
	Quit   key.Binding
}

KeyMap defines the key bindings for the task list.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default key bindings.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the Bubble Tea model for the task list component.

func New

func New(service taskboard.Service) Model

New creates a new task list model.

func (Model) Cursor

func (m Model) Cursor() int

Cursor returns the current cursor position.

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model.

func (Model) IsFocused

func (m Model) IsFocused() bool

IsFocused returns whether the component is focused.

func (*Model) Refresh

func (m *Model) Refresh()

Refresh reloads tasks from the service (public method). If the service supports Reloader interface, it reloads from file first.

func (*Model) SetFocused

func (m *Model) SetFocused(focused bool)

SetFocused sets whether the component is focused.

func (Model) Tasks

func (m Model) Tasks() []*taskboard.Task

Tasks returns the current list of tasks.

func (Model) Update

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

Update implements tea.Model.

func (Model) View

func (m Model) View() string

View implements tea.Model.

Jump to

Keyboard shortcuts

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