ui

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 12 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"),
	),
	Skip: key.NewBinding(
		key.WithKeys("s"),
		key.WithHelp("s", "skip"),
	),
	Quit: key.NewBinding(
		key.WithKeys("ctrl+c", "q"),
		key.WithHelp("q", "quit"),
	),
}

Functions

This section is empty.

Types

type ExitStatus added in v0.6.0

type ExitStatus byte
const (
	Completed ExitStatus = iota
	Skipped
	Quit
)

func (ExitStatus) String added in v0.6.0

func (e ExitStatus) String() string

type KeyMap

type KeyMap struct {
	Increase key.Binding
	Reset    key.Binding
	Pause    key.Binding
	Skip     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 {
	ASCIITimerStyle lipgloss.Style
	// contains filtered or unexported fields
}

func NewModel

func NewModel(task config.Task, asciiArt config.ASCIIArt) Model

func (Model) ExitStatus added in v0.6.0

func (m Model) ExitStatus() ExitStatus

func (Model) Init

func (m Model) Init() tea.Cmd

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 ascii provides ASCII art style.
Package ascii provides ASCII art style.
Package colors defines color constants for UI elements.
Package colors defines color constants for UI elements.
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