Documentation ¶
Index ¶
- Variables
- func OsInit()
- func WriteConfig(config Config)
- type AllPersistedResults
- type Config
- type ConfigView
- type ConfigViewSelection
- type EmbededWordList
- type Layout
- type LayoutFile
- type LocalConfig
- type MainMenu
- type MainMenuSelection
- type NumericSetting
- type PersistentResults
- type PersistentResultsNode
- type Results
- type ResultsIdentifier
- type SentenceCountBasedTest
- type SentenceCountBasedTestSettings
- type SentenceCountTestResults
- type State
- type StringStyle
- type Styles
- type TestBase
- type TestSettingCursors
- type TestType
- type TimerBasedTest
- type TimerBasedTestResults
- type TimerBasedTestSettings
- type Toggleable
- type WordCountBasedTest
- type WordCountBasedTestSettings
- type WordCountTestResults
- type WordList
- type WordListName
- type WordListSelection
- type WordsSelection
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "dev" RootCmd = &cobra.Command{ Use: "typioca", Long: "typioca — cozy typing speed tester", RunE: func(cmd *cobra.Command, args []string) error { if showVersion { fmt.Println("typioca ", Version) return nil } else { termenv.SetWindowTitle("typioca") defer println("bye!") termWidth, termHeight, _ := term.GetSize(int(os.Stdin.Fd())) p := tea.NewProgram( initialModel( termenv.ColorProfile(), termenv.ForegroundColor(), termWidth, termHeight, ), tea.WithAltScreen(), ) return p.Start() } }, } )
Functions ¶
func WriteConfig ¶
func WriteConfig(config Config)
Types ¶
type AllPersistedResults ¶
type AllPersistedResults = map[TestType]map[NumericSetting]map[WordListName][]PersistentResultsNode
type Config ¶
type Config struct { TestSettingCursors TestSettingCursors EmbededWordLists []EmbededWordList WordLists []WordList LayoutFiles []LayoutFile Layout Layout Version int }
func ReadConfig ¶
func ReadConfig() Config
type ConfigView ¶
type ConfigView struct {
// contains filtered or unexported fields
}
type ConfigViewSelection ¶
type ConfigViewSelection struct{}
func (ConfigViewSelection) Enabled ¶
func (s ConfigViewSelection) Enabled() bool
type EmbededWordList ¶
type LayoutFile ¶
type LocalConfig ¶
type LocalConfig struct {
Words []WordList
}
type MainMenuSelection ¶
type MainMenuSelection interface { Enabled() bool // contains filtered or unexported methods }
type NumericSetting ¶
type NumericSetting = int
type PersistentResults ¶
type PersistentResults struct { Results AllPersistedResults Version int }
func PersistResults ¶
func PersistResults(results Results) PersistentResults
type PersistentResultsNode ¶
type PersistentResultsNode struct { Wpm int Accuracy float64 DeltaWpm float64 RawWpm int Cpm int WpmEachSecond []float64 }
func ReadResults ¶
func ReadResults(i ResultsIdentifier) []PersistentResultsNode
type ResultsIdentifier ¶
type ResultsIdentifier struct {
// contains filtered or unexported fields
}
type SentenceCountBasedTest ¶
type SentenceCountBasedTest struct {
// contains filtered or unexported fields
}
type SentenceCountBasedTestSettings ¶
type SentenceCountBasedTestSettings struct {
// contains filtered or unexported fields
}
func (SentenceCountBasedTestSettings) Enabled ¶
func (s SentenceCountBasedTestSettings) Enabled() bool
type SentenceCountTestResults ¶
type SentenceCountTestResults struct {
// contains filtered or unexported fields
}
type StringStyle ¶
type TestSettingCursors ¶
type TimerBasedTest ¶
type TimerBasedTest struct {
// contains filtered or unexported fields
}
type TimerBasedTestResults ¶
type TimerBasedTestResults struct {
// contains filtered or unexported fields
}
type TimerBasedTestSettings ¶
type TimerBasedTestSettings struct {
// contains filtered or unexported fields
}
func (TimerBasedTestSettings) Enabled ¶
func (s TimerBasedTestSettings) Enabled() bool
type Toggleable ¶
type Toggleable interface {
// contains filtered or unexported methods
}
type WordCountBasedTest ¶
type WordCountBasedTest struct {
// contains filtered or unexported fields
}
type WordCountBasedTestSettings ¶
type WordCountBasedTestSettings struct {
// contains filtered or unexported fields
}
func (WordCountBasedTestSettings) Enabled ¶
func (s WordCountBasedTestSettings) Enabled() bool
type WordCountTestResults ¶
type WordCountTestResults struct {
// contains filtered or unexported fields
}
type WordListName ¶
type WordListName = string
type WordListSelection ¶
type WordListSelection struct {
// contains filtered or unexported fields
}
type WordsSelection ¶
type WordsSelection struct {
// contains filtered or unexported fields
}
todo: clean these up. Maybe we could reuse filtering by enabled and synce, because now it's redundant
Source Files ¶
Click to show internal directories.
Click to hide internal directories.