config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load() error

Load は設定を読み込んでグローバル変数に格納する

func SetDefaults

func SetDefaults()

SetDefaults はデフォルト値を設定する

Types

type Colors

type Colors struct {
	Title          string `mapstructure:"title"`
	Selected       string `mapstructure:"selected"`
	Done           string `mapstructure:"done"`
	Help           string `mapstructure:"help"`
	Empty          string `mapstructure:"empty"`
	PriorityHigh   string `mapstructure:"priority_high"`
	PriorityMedium string `mapstructure:"priority_medium"`
	PriorityLow    string `mapstructure:"priority_low"`
}

Colors はカラー設定 (hex or 256色)

type Config

type Config struct {
	NotesDir    string   `mapstructure:"notes_dir"`
	Editor      string   `mapstructure:"editor"`
	DefaultTags []string `mapstructure:"default_tags"`
	Paths       Paths    `mapstructure:"paths"`
	Formats     Formats  `mapstructure:"formats"`
	Theme       Theme    `mapstructure:"theme"`
	Display     Display  `mapstructure:"display"`
}

Config はアプリケーション全体の設定を保持する

var Global *Config

Global は現在の設定を保持するグローバル変数

func (*Config) GetDailyPath

func (c *Config) GetDailyPath() string

GetDailyPath はデイリーノートディレクトリの絶対パスを返す

func (*Config) GetTasksPath

func (c *Config) GetTasksPath() string

GetTasksPath はタスクファイルの絶対パスを返す

func (*Config) GetTemplatesPath

func (c *Config) GetTemplatesPath() string

GetTemplatesPath はテンプレートディレクトリの絶対パスを返す

type Display

type Display struct {
	SeparatorWidth int `mapstructure:"separator_width"`
	SearchTruncate int `mapstructure:"search_truncate"`
	TaskCharLimit  int `mapstructure:"task_char_limit"`
	InputWidth     int `mapstructure:"input_width"`
}

Display は表示設定

type Formats

type Formats struct {
	Date     string `mapstructure:"date"`
	DateTime string `mapstructure:"datetime"`
}

Formats は日付フォーマットの設定

type Paths

type Paths struct {
	TemplatesDir string `mapstructure:"templates_dir"`
	TasksFile    string `mapstructure:"tasks_file"`
	DailyDir     string `mapstructure:"daily_dir"`
}

Paths はパス関連の設定

type Sections

type Sections struct {
	P1   string `mapstructure:"p1"`
	P2   string `mapstructure:"p2"`
	P3   string `mapstructure:"p3"`
	Done string `mapstructure:"done"`
}

Sections はセクション名設定

type Symbols

type Symbols struct {
	Cursor        string `mapstructure:"cursor"`
	CursorEmpty   string `mapstructure:"cursor_empty"`
	CheckboxEmpty string `mapstructure:"checkbox_empty"`
	CheckboxDone  string `mapstructure:"checkbox_done"`
	NoteIcon      string `mapstructure:"note_icon"`
	TaskIcon      string `mapstructure:"task_icon"`
	DailyIcon     string `mapstructure:"daily_icon"`
}

Symbols はシンボル設定

type Theme

type Theme struct {
	Colors   Colors   `mapstructure:"colors"`
	Symbols  Symbols  `mapstructure:"symbols"`
	Sections Sections `mapstructure:"sections"`
}

Theme はテーマ設定

Jump to

Keyboard shortcuts

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