Documentation
¶
Index ¶
- func BuildKeyBinding(keys []string, help string, description string) key.Binding
- func GetConfigPath() (string, error)
- type ColorsConfig
- type Config
- func (c *Config) AddState(name, color string)
- func (c *Config) AddTag(name, color string)
- func (c *Config) GetAllKeybindings() map[string][]string
- func (c *Config) GetDefaultNewTaskState() string
- func (c *Config) GetStateColor(stateName string) string
- func (c *Config) GetStateNames() []string
- func (c *Config) GetTagColor(tagName string) string
- func (c *Config) RemoveState(name string)
- func (c *Config) RemoveTag(name string)
- func (c *Config) Save() error
- func (c *Config) UpdateKeybinding(action string, keys []string) error
- func (c *Config) UpdateStateColor(name, color string)
- func (c *Config) UpdateTagColor(name, color string)
- type KeybindingsConfig
- type StateConfig
- type StatesConfig
- type TagConfig
- type TagsConfig
- type UIConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildKeyBinding ¶
BuildKeyBinding creates a key.Binding from config
func GetConfigPath ¶
GetConfigPath returns the path to the config file
Types ¶
type ColorsConfig ¶
type ColorsConfig struct {
Todo string `toml:"todo"`
Progress string `toml:"progress"`
Blocked string `toml:"blocked"`
Done string `toml:"done"`
Cursor string `toml:"cursor"`
Title string `toml:"title"`
Scheduled string `toml:"scheduled"`
Overdue string `toml:"overdue"`
Status string `toml:"status"`
Note string `toml:"note"`
Folded string `toml:"folded"`
}
ColorsConfig holds color configurations
type Config ¶
type Config struct {
Keybindings KeybindingsConfig `toml:"keybindings"`
Colors ColorsConfig `toml:"colors"`
Tags TagsConfig `toml:"tags"`
States StatesConfig `toml:"states"`
UI UIConfig `toml:"ui"`
}
Config represents the application configuration
func LoadConfig ¶
LoadConfig loads the configuration from the config file
func (*Config) GetAllKeybindings ¶
GetAllKeybindings returns a map of all keybindings
func (*Config) GetDefaultNewTaskState ¶
GetDefaultNewTaskState returns the default state for new tasks Returns empty string if configured as "none" or if the configured state doesn't exist
func (*Config) GetStateColor ¶
GetStateColor returns the color for a given state name
func (*Config) GetStateNames ¶
GetStateNames returns all configured state names
func (*Config) GetTagColor ¶
GetTagColor returns the color for a given tag name
func (*Config) RemoveState ¶
RemoveState removes a state from the configuration
func (*Config) UpdateKeybinding ¶
UpdateKeybinding updates a keybinding in the configuration
func (*Config) UpdateStateColor ¶
UpdateStateColor updates the color of an existing state
func (*Config) UpdateTagColor ¶
UpdateTagColor updates the color of an existing tag
type KeybindingsConfig ¶
type KeybindingsConfig struct {
Up []string `toml:"up"`
Down []string `toml:"down"`
Left []string `toml:"left"`
Right []string `toml:"right"`
ShiftUp []string `toml:"shift_up"`
ShiftDown []string `toml:"shift_down"`
ShiftLeft []string `toml:"shift_left"`
ShiftRight []string `toml:"shift_right"`
Rename []string `toml:"rename"`
CycleState []string `toml:"cycle_state"`
ToggleFold []string `toml:"toggle_fold"`
ToggleFoldAll []string `toml:"toggle_fold_all"`
EditNotes []string `toml:"edit_notes"`
ToggleView []string `toml:"toggle_view"`
Capture []string `toml:"capture"`
AddSubTask []string `toml:"add_subtask"`
Delete []string `toml:"delete"`
Save []string `toml:"save"`
ToggleReorder []string `toml:"toggle_reorder"`
ClockIn []string `toml:"clock_in"`
ClockOut []string `toml:"clock_out"`
SetDeadline []string `toml:"set_deadline"`
SetScheduled []string `toml:"set_scheduled"`
SetPriority []string `toml:"set_priority"`
SetEffort []string `toml:"set_effort"`
Help []string `toml:"help"`
Quit []string `toml:"quit"`
Settings []string `toml:"settings"`
TagItem []string `toml:"tag_item"`
}
KeybindingsConfig holds all keybinding configurations
type StateConfig ¶
StateConfig represents a single TODO state configuration
type StatesConfig ¶
type StatesConfig struct {
States []StateConfig `toml:"states"`
DefaultNewTaskState string `toml:"default_new_task_state"`
}
StatesConfig holds TODO state configurations
type TagsConfig ¶
type TagsConfig struct {
Enabled bool `toml:"enabled"`
Tags []TagConfig `toml:"tags"`
DefaultTag string `toml:"default_tag"`
}
TagsConfig holds tag configurations
type UIConfig ¶
type UIConfig struct {
HelpTextWidth int `toml:"help_text_width"`
MinTerminalWidth int `toml:"min_terminal_width"`
AgendaDays int `toml:"agenda_days"`
OrgSyntaxHighlighting bool `toml:"org_syntax_highlighting"`
ShowIndentationGuides bool `toml:"show_indentation_guides"`
IndentationGuideColor string `toml:"indentation_guide_color"`
}
UIConfig holds UI-related configurations