config

package
v0.0.0-...-c9d98e2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath() string

func UserDownloadsDir

func UserDownloadsDir() string

Types

type Config

type Config struct {
	General GeneralConfig `toml:"general"`
	Theme   ThemeConfig   `toml:"theme"`
	Keys    KeysConfig    `toml:"keys"`
}

func New

func New() *Config

func (*Config) Load

func (c *Config) Load(path string)

type GeneralConfig

type GeneralConfig struct {
	UserAgent              string         `toml:"user_agent"`
	FetchMessagesLimit     int            `toml:"fetch_messages_limit"`
	Mouse                  bool           `toml:"mouse"`
	Timestamps             bool           `toml:"timestamps"`
	Identify               IdentifyConfig `toml:"identify"`
	AttachmentDownloadsDir string         `toml:"attachment_downloads_dir"`
}

type IdentifyConfig

type IdentifyConfig struct {
	Os      string `toml:"os"`
	Browser string `toml:"browser"`
}

type KeysConfig

type KeysConfig struct {
	ToggleGuildsList        string `toml:"toggle_guilds_list"`
	ToggleChannelsTreeView  string `toml:"toggle_channels_tree_view"`
	ToggleMessagesTextView  string `toml:"toggle_messages_text_view"`
	ToggleMessageInputField string `toml:"toggle_message_input_field"`

	OpenMessageActionsList string `toml:"open_message_actions_list"`
	OpenExternalEditor     string `toml:"open_external_editor"`

	SelectPreviousMessage string `toml:"select_previous_message"`
	SelectNextMessage     string `toml:"select_next_message"`
	SelectFirstMessage    string `toml:"select_first_message"`
	SelectLastMessage     string `toml:"select_last_message"`
}

type ThemeConfig

type ThemeConfig struct {
	Background string `toml:"background"`
	Border     string `toml:"border"`
	Title      string `toml:"title"`
}

Jump to

Keyboard shortcuts

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