breathing

package
v1.1.0 Latest Latest
Warning

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

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

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 AddBottomPadding

func AddBottomPadding()

AddBottomPadding adds consistent bottom padding

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) ParseArgs

func (s *Session) ParseArgs(args []string)

ParseArgs parses command line arguments and configures the session

func (*Session) ShouldShowQuote

func (s *Session) ShouldShowQuote() bool

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.

Jump to

Keyboard shortcuts

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