settings

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSettings

func LoadSettings() tea.Msg

func SaveSettings

func SaveSettings(s Settings) tea.Cmd

Types

type KeyMap

type KeyMap struct {
	Up     key.Binding
	Down   key.Binding
	Select key.Binding
	Done   key.Binding
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

type Model

type Model struct {
	Settings Settings

	Done bool
	// contains filtered or unexported fields
}

func New

func New(settings Settings) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type NoSettingsDefinedMsg

type NoSettingsDefinedMsg struct{}

type Settings

type Settings struct {
	DefaultDirectory string
	ClearScreen      bool
	Shell            string
}

func Defaults

func Defaults() Settings

type SettingsLoadErrMsg

type SettingsLoadErrMsg struct {
	Err error
}

type SettingsLoadedMsg

type SettingsLoadedMsg struct {
	Settings Settings
}

type SettingsSaveErrMsg

type SettingsSaveErrMsg struct{ Err error }

type SettingsSavedMsg

type SettingsSavedMsg struct{}

Jump to

Keyboard shortcuts

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