Documentation ¶
Overview ¶
License: GPL-3.0-only (c) 2022 Dakota Walsh <kota@nilsu.org>
License: GPL-3.0-only (c) 2022 Dakota Walsh <kota@nilsu.org>
Index ¶
- Constants
- type Layout
- type Month
- func (m Month) Date() time.Time
- func (m *Month) Focus()
- func (m Month) Init() tea.Cmd
- func (m Month) Select(t time.Time) Month
- func (m Month) Selected() time.Time
- func (m *Month) SetToday(t time.Time)
- func (m Month) String() string
- func (m *Month) Unfocus()
- func (m Month) Update(msg tea.Msg) (Month, tea.Cmd)
- func (m Month) View() string
Constants ¶
View Source
const ( MonthHeight = 8 MonthWidth = 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layout ¶ added in v0.2.0
type Layout uint8
Layout describes the arrangement of the month elements.
type Month ¶
type Month struct {
// contains filtered or unexported fields
}
Month is the Bubble Tea model for this month element.
func New ¶
func New( date, today, selected time.Time, layout Layout, holidays holiday.Holidays, conf *config.Config, ) Month
New creates a new month model. The list of styledDays is not calculated on creation. The Init method must be called to parse and load these concurrently.
func (Month) Init ¶
Init the month in Bubble Tea. Reads holidays and keywords to build out a list of styledDays.
func (Month) Selected ¶
Selected returns the current selection (from the perspective of this month).
Click to show internal directories.
Click to hide internal directories.