Documentation
¶
Index ¶
- Variables
- func StyleErr(s string) string
- func StyleHeader(s string) string
- func StyleKey(s string) string
- func StyleResult(s string) string
- func StyleStatus(s string) string
- type Model
- func (m Model) DecreaseQuantity() (tea.Model, tea.Cmd)
- func (m Model) IncreaseQuantity() (tea.Model, tea.Cmd)
- func (m Model) Init() tea.Cmd
- func (m Model) IsValid() (bool, error)
- func (m Model) NextDie() (tea.Model, tea.Cmd)
- func (m Model) PrevDie() (tea.Model, tea.Cmd)
- func (m Model) Roll() (tea.Model, tea.Cmd)
- func (m Model) Selection() string
- func (m Model) SetStatus() (tea.Model, tea.Cmd)
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m Model) View() string
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = keymap{ Up: key.NewBinding( key.WithKeys("k", "up"), key.WithHelp("↑/k", "add dice"), ), Down: key.NewBinding( key.WithKeys("j", "down"), key.WithHelp("↓/j", "remove dice"), ), Left: key.NewBinding( key.WithKeys("h", "left"), key.WithHelp("🡠/h", "prev die"), ), Right: key.NewBinding( key.WithKeys("l", "right"), key.WithHelp("🡢/l", "next die"), ), Roll: key.NewBinding( key.WithKeys("e", "enter"), key.WithHelp("e/enter", "roll dice"), ), Clear: key.NewBinding( key.WithKeys("c", "ctrl+l"), key.WithHelp("c", "clear"), ), Help: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "help"), ), Quit: key.NewBinding( key.WithKeys("q", "ctrl+c", "esc"), key.WithHelp("q", "quit"), ), }
Functions ¶
func StyleHeader ¶
func StyleResult ¶
func StyleStatus ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.