focus

package
v0.0.0-...-927a21c Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	State State
	Task  *core.Task

	Timer        time.Duration
	TotalFocused time.Duration

	Active bool

	FocusDuration      time.Duration
	ShortBreakDuration time.Duration
	LongBreakDuration  time.Duration

	SessionID string
	// contains filtered or unexported fields
}

func New

func New(s styles.Styles) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) SetSize

func (m *Model) SetSize(w, h int)

func (Model) Update

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

func (Model) View

func (m Model) View() string

type SessionDoneMsg

type SessionDoneMsg struct {
	Session core.FocusSession
}

type State

type State int
const (
	StateIdle State = iota
	StateFocus
	StateShortBreak
	StateLongBreak
)

type TickMsg

type TickMsg time.Time

Jump to

Keyboard shortcuts

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