app

package
v0.0.0-...-5375a1e Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UpToDateStyle = lipgloss.NewStyle().Foreground(color.BrightGreen).Bold(true)
	DirtyStyle    = lipgloss.NewStyle().Foreground(color.BrightWhite).Bold(true)

	CallToAction = lipgloss.NewStyle().
					Bold(true).
					Padding(1, 2).
					Border(lipgloss.DoubleBorder(), true).
					BorderForeground(lipgloss.Color("63")).
					Foreground(lipgloss.Color("111"))

	FooterState = lipgloss.NewStyle().
				Bold(true).
				Padding(0, 1).
				Background(lipgloss.Color("206")).
				Foreground(lipgloss.Color("228"))
	FooterTimer = lipgloss.NewStyle().
				Bold(true).
				Padding(0, 1).
				Background(lipgloss.Color("235")).
				Foreground(lipgloss.Color("248"))
	FooterError = lipgloss.NewStyle().
				Padding(0, 1).
				Bold(true).
				Background(color.Gray).
				Foreground(color.BrightRed)
	FooterPomos = lipgloss.NewStyle().
				Bold(true).
				Padding(0, 1).
				Background(lipgloss.Color("233")).
				Foreground(lipgloss.Color("243"))
	FooterPomosGoal = lipgloss.NewStyle().
					Bold(true).
					Padding(0, 1).
					Background(lipgloss.Color("94")).
					Foreground(lipgloss.Color("255"))
	FooterSaveState = lipgloss.NewStyle().
					Padding(0, 1).
					Background(lipgloss.Color("62")).
					Foreground(lipgloss.Color("230"))
	FooterHelp = lipgloss.NewStyle().
				Padding(0, 1).
				Background(lipgloss.Color("237")).
				Foreground(lipgloss.Color("243"))

	Help = lipgloss.NewStyle().
			Padding(1, 1, 0)
)

Functions

This section is empty.

Types

type CancelBreakMsg

type CancelBreakMsg struct{}

type CancelPomoMsg

type CancelPomoMsg struct{}

type CompletePomoMsg

type CompletePomoMsg struct{}

type DeleteTaskMsg

type DeleteTaskMsg struct{}

type KeyMap

type KeyMap struct {
	ToggleHelp key.Binding

	Quit key.Binding

	StartPomo   key.Binding
	CancelPomo  key.Binding
	StartBreak  key.Binding
	CancelBreak key.Binding

	NewTask    key.Binding
	EditTask   key.Binding
	DeleteTask key.Binding
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

func (KeyMap) FullHelp

func (m KeyMap) FullHelp() [][]key.Binding

func (KeyMap) ShortHelp

func (m KeyMap) ShortHelp() []key.Binding

type Model

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

func New

func New(cfg config.Config, s *store.Store) Model

func (*Model) EditTask

func (m *Model) EditTask(task pomo.Task) tea.Cmd

func (Model) FullHelp

func (m Model) FullHelp() [][]key.Binding

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) InputNewTask

func (m *Model) InputNewTask(status pomo.Status) tea.Cmd

func (*Model) SetPrompt

func (m *Model) SetPrompt(prompt string, onConfirm tea.Msg)

func (Model) ShortHelp

func (m Model) ShortHelp() []key.Binding

func (*Model) ToggleHelp

func (m *Model) ToggleHelp()

func (Model) Update

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

func (Model) View

func (m Model) View() string

type StartPomoMsg

type StartPomoMsg struct{}

Jump to

Keyboard shortcuts

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