config

package
v0.0.0-...-d76a7db Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Mouse bool `toml:"mouse"`

	Timestamps             bool   `toml:"timestamps"`
	TimestampsBeforeAuthor bool   `toml:"timestamps_before_author"`
	TimestampsFormat       string `toml:"timestamps_format"`

	MessagesLimit uint8 `toml:"messages_limit"`

	Editor string `toml:"editor"`

	Keys  Keys  `toml:"keys"`
	Theme Theme `toml:"theme"`
}

func DefaultConfig

func DefaultConfig() Config

func Load

func Load() (*Config, error)

Reads the configuration file and parses it.

type GuildsTreeKeys

type GuildsTreeKeys struct {
	SelectCurrent string `toml:"select_current"`
}

type GuildsTreeTheme

type GuildsTreeTheme struct {
	AutoExpandFolders bool `toml:"auto_expand_folders"`
	Graphics          bool `toml:"graphics"`
}

type Keys

type Keys struct {
	FocusGuildsTree   string `toml:"focus_guilds_tree"`
	FocusMessagesText string `toml:"focus_messages_text"`
	FocusMessageInput string `toml:"focus_message_input"`
	ToggleGuildsTree  string `toml:"toggle_guild_tree"`

	SelectPrevious string `toml:"select_previous"`
	SelectNext     string `toml:"select_next"`
	SelectFirst    string `toml:"select_first"`
	SelectLast     string `toml:"select_last"`

	GuildsTree   GuildsTreeKeys   `toml:"guilds_tree"`
	MessagesText MessagesTextKeys `toml:"messages_text"`
	MessageInput MessageInputKeys `toml:"message_input"`
}

type MessageInputKeys

type MessageInputKeys struct {
	Send   string `toml:"send"`
	Editor string `toml:"editor"`
	Cancel string `toml:"cancel"`
}

type MessagesTextKeys

type MessagesTextKeys struct {
	SelectReply  string `toml:"select_reply"`
	Reply        string `toml:"reply"`
	ReplyMention string `toml:"reply_mention"`

	Delete string `toml:"delete"`
	Yank   string `toml:"yank"`
	Open   string `toml:"open"`
}

type MessagesTextTheme

type MessagesTextTheme struct {
	AuthorColor    string `toml:"author_color"`
	ReplyIndicator string `toml:"reply_indicator"`
}

type Theme

type Theme struct {
	Border        bool   `toml:"border"`
	BorderColor   string `toml:"border_color"`
	BorderPadding [4]int `toml:"border_padding"`

	TitleColor      string `toml:"title_color"`
	BackgroundColor string `toml:"background_color"`

	GuildsTree   GuildsTreeTheme   `toml:"guilds_tree"`
	MessagesText MessagesTextTheme `toml:"messages_text"`
}

Jump to

Keyboard shortcuts

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