ui

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package ui provides the terminal user interface for pomodoro sessions.

Index

Constants

This section is empty.

Variables

View Source
var Keys = KeyMap{
	Increase: key.NewBinding(
		key.WithKeys("k", "up"),
		key.WithHelp("↑", "+1 minute"),
	),
	Reset: key.NewBinding(
		key.WithKeys("h", "left"),
		key.WithHelp("←", "reset"),
	),
	Pause: key.NewBinding(
		key.WithKeys(" "),
		key.WithHelp("space", "pause/resume"),
	),
	Quit: key.NewBinding(
		key.WithKeys("ctrl+c", "q"),
		key.WithHelp("q", "quit"),
	),
}

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	Increase key.Binding
	Reset    key.Binding
	Pause    key.Binding
	Quit     key.Binding
}

func (KeyMap) FullHelp

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

func (KeyMap) ShortHelp

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

type Model

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

func NewModel

func NewModel(task config.Task) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) TimerCompleted

func (m Model) TimerCompleted() bool

func (Model) Update

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

func (Model) View

func (m Model) View() string

Directories

Path Synopsis
Package confirm provides a simple confirmation dialog component
Package confirm provides a simple confirmation dialog component

Jump to

Keyboard shortcuts

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