config

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

License: GPL-3.0-only (c) 2022 Dakota Walsh <kota@nilsu.org>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TodayStyle           Style
	InactiveStyle        Style
	NotedStyle           Style
	NoteDir              string
	Editor               string
	LeftPadding          int
	RightPadding         int
	PreviewLeftMargin    int
	PreviewPadding       int
	PreviewMinWidth      int
	PreviewMaxWidth      int
	KeyQuit              Control
	KeyHelp              Control
	KeySelectLeft        Control
	KeySelectDown        Control
	KeySelectUp          Control
	KeySelectRight       Control
	KeyFocusPreview      Control
	KeyTogglePreview     Control
	KeyScrollPreviewDown Control
	KeyScrollPreviewUp   Control
	KeyEditNote          Control
	KeyYankDate          Control
	KeyLastSunday        Control
	KeyNextSunday        Control
	KeyNextSaturday      Control
	KeyMonthUp           Control
	KeyMonthDown         Control
	HolidayLists         []string
	Keywords             keyword.Keywords
}

Config represents the toml configuration file.

func Default

func Default() *Config

Default returns the default configuration.

func Load

func Load() (*Config, error)

Load a configuration file from the user's config directory, the system config directory, or as a final fallback return default config settings.

type Control added in v0.2.0

type Control []string

Control is a slice of strings representing the keys bound to a given action.

func (Control) Contains added in v0.2.0

func (c Control) Contains(key string) bool

Contains reports if a key is bound for this control action.

type Style added in v0.3.0

type Style struct {
	Color  string
	Bold   bool
	Italic bool
}

Style represents how a type of date should be displayed.

func (Style) Blank added in v0.3.0

func (s Style) Blank() bool

Blank returns true if the Style has no color and is not bold or italicized.

func (Style) Export added in v0.3.0

func (s Style) Export(base lipgloss.Style) lipgloss.Style

Export takes a base lipgloss.Style and makes the changes needed based on this configured Style.

Jump to

Keyboard shortcuts

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