config

package
v0.0.0-...-7f4b838 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 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"`
	HideBlockedUsers bool   `toml:"hide_blocked_users"`
	MessagesLimit    uint8  `toml:"messages_limit"`
	Editor           string `toml:"editor"`

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

	UserAgent string `toml:"user_agent"`
	OS        string `toml:"os"`
	Browser   string `toml:"browser"`
	Device    string `toml:"device"`

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

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"`
	ChannelColor        string `toml:"channel_color"`
	Graphics            bool   `toml:"graphics"`
	GuildColor          string `toml:"guild_color"`
	PrivateChannelColor string `toml:"private_channel_color"`
}

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_guilds_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"`

	Logout string `toml:"logout"`
}

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"`
	ContentColor   string `toml:"content_color"`
	EmojiColor     string `toml:"emoji_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