Documentation
¶
Overview ¶
Package breathing provides mindful breathing session functionality. It handles breathing visualization, timing, and user interaction.
Index ¶
Constants ¶
View Source
const ( LeftPadding = 4 // Left margin for all content SectionSpacing = 1 // Space between sections BottomPadding = 2 // Extra spacing at bottom RestDuration = 2 * time.Second )
Constants for breathing visualization
Variables ¶
This section is empty.
Functions ¶
func AddSectionSpacing ¶
func AddSectionSpacing()
AddSectionSpacing adds consistent spacing between sections
func PrintWithPadding ¶
func PrintWithPadding(text string)
PrintWithPadding prints text with consistent left padding
Types ¶
type Session ¶
type Session struct {
Cycles int
ShowQuote bool
InhaleDur int
HoldDur int
ExhaleDur int
RestDur time.Duration
SimpleMode bool
}
Session represents a breathing session configuration
func NewSession ¶
func NewSession() *Session
NewSession creates a new breathing session with default settings
func (Session) HideCursor ¶ added in v0.3.4
func (s Session) HideCursor() func()
func (*Session) ShouldShowQuote ¶
ShouldShowQuote returns whether to show quote after breathing
func (*Session) Start ¶
func (s *Session) Start()
Start begins the breathing session with visualization
func (*Session) StartAnchor ¶ added in v1.1.0
func (s *Session) StartAnchor()
StartAnchor provides an immediate, intuitive manual breathing session.
Click to show internal directories.
Click to hide internal directories.