Documentation ¶
Overview ¶
Package config is responsible for setting the program config from the config file and command-line arguments
Index ¶
Constants ¶
View Source
const SoundOff = "off"
View Source
const Version = "v1.4.2"
Variables ¶
This section is empty.
Functions ¶
func DBFilePath ¶ added in v1.4.0
func DBFilePath() string
func InitializePaths ¶ added in v1.4.0
func InitializePaths()
func LogFilePath ¶ added in v1.4.1
func LogFilePath() string
func StatusFilePath ¶ added in v1.4.0
func StatusFilePath() string
Types ¶
type FilterConfig ¶ added in v1.4.0
FilterConfig represents a configuration to filter sessions in the database by their start time, end time, and assigned tags.
func Filter ¶ added in v1.4.0
func Filter(ctx *cli.Context) *FilterConfig
Filter initializes and returns a configuration to filter sessions from command-line arguments.
type TimerConfig ¶
type TimerConfig struct { Duration Duration `json:"duration"` Message Message `json:"message"` AmbientSound string `json:"sound"` BreakSound string `json:"break_sound"` WorkSound string `json:"work_sound"` PathToConfig string `json:"path_to_config"` PathToDB string `json:"path_to_db"` SessionCmd string `json:"session_cmd"` Tags []string `json:"tags"` LongBreakInterval int `json:"long_break_interval"` Notify bool `json:"notify"` DarkTheme bool `json:"dark_theme"` TwentyFourHourClock bool `json:"twenty_four_hour_clock"` PlaySoundOnBreak bool `json:"sound_on_break"` AutoStartBreak bool `json:"auto_start_break"` AutoStartWork bool `json:"auto_start_work"` Strict bool `json:"strict"` }
TimerConfig represents the program configuration derived from the config file and command-line arguments.
func Timer ¶ added in v1.4.0
func Timer(ctx *cli.Context) *TimerConfig
Timer initializes and returns the timer configuration.
Click to show internal directories.
Click to hide internal directories.