config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigDir = "taskyzator"

Variables

This section is empty.

Functions

func Reset

func Reset() error

func Save

func Save() error

Types

type Config

type Config struct {
	Controls Controls `yaml:"controls"`
	Style    Style    `yaml:"style"`
}
var Current Config

type Controls

type Controls struct {
	// Main control
	Quit       Key `yaml:"quit"`
	Apply      Key `yaml:"apply"`
	Cancel     Key `yaml:"cancel"`
	CursorUp   Key `yaml:"cursor-up"`
	CursorDown Key `yaml:"cursor-down"`
	// tasks
	NewTask       Key `yaml:"new-task"`
	DoneTask      Key `yaml:"done-task"`
	UndoneTask    Key `yaml:"undone-task"`
	ArchiveTask   Key `yaml:"archive-task"`
	UnarchiveTask Key `yaml:"unarchive-task"`
	DeleteTask    Key `yaml:"delete-task"`
}

type Key

type Key string

func (Key) Binding

func (k Key) Binding() key.BindingOpt

func (Key) Contains

func (k Key) Contains(keyName string) bool

func (Key) Help

func (k Key) Help(help string) key.BindingOpt

func (Key) Key

func (k Key) Key() string

type Style

type Style struct {
	ErrorColor            string `yaml:"error-color"`
	AccentColor           string `yaml:"accent-color"`
	DimmedColor           string `yaml:"dimmed-color"`
	NormalColor           string `yaml:"normal-color"`
	ActiveTaskTextColor   string `yaml:"active-task-text-color"`
	DoneTaskTextColor     string `yaml:"done-task-text-color"`
	ArchivedTaskTextColor string `yaml:"archived-task-text-color"`
}

Jump to

Keyboard shortcuts

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