@ -20,27 +20,37 @@ type TypeCommand struct {
// Config holds user-configurable values
// Config holds user-configurable values
type Config struct {
type Config struct {
filepath string ` toml:"-" `
filepath string ` toml:"-" ` // filepath is not stored in the config file, but is written to the Config struct so it's known where the config was loaded from
Basics Basics ` toml:"basics" `
Basics Basics ` toml:"basics" `
Formatting Formatting ` toml:"formatting" `
Formatting Formatting ` toml:"formatting" `
Colors Colors ` toml:"colors" `
Colors Colors ` toml:"colors" `
}
}
// Basics holds the 'basics' section of the config file
type Basics struct {
type Basics struct {
DownloadPath string ` toml:"downloadP ath" `
DownloadPath string ` toml:"download_p ath" `
Colorless bool ` toml:"colorless" `
Colorless bool ` toml:"colorless" `
CmdPrefix string ` toml:"cmdP refix" `
CmdPrefix string ` toml:"cmd_p refix" `
}
}
// Formatting holds the 'formatting' section of the config file
type Formatting struct {
type Formatting struct {
OutputFormat string ` toml:"outputF ormat" `
OutputFormat string ` toml:"output_f ormat" `
OutputStreamFormat string ` toml:"outputStreamF ormat" `
OutputStreamFormat string ` toml:"output_stream_f ormat" `
OutputMentionFormat string ` toml:"outputMentionF ormat" `
OutputMentionFormat string ` toml:"output_mention_f ormat" `
PMFormat string ` toml:"pmF ormat" `
PMFormat string ` toml:"pm_f ormat" `
DateFormat string ` toml:"dateF ormat" `
DateFormat string ` toml:"date_f ormat" `
TimeFormat string ` toml:"timeF ormat" `
TimeFormat string ` toml:"time_f ormat" `
}
}
// Colors holds the 'colors' section of the config file
type Colors struct {
Channels Channels ` toml:"channels" `
Message Message ` toml:"message" `
Feed Feed ` toml:"feed" `
}
// Style holds basic style information
type Style struct {
type Style struct {
Foreground string ` toml:"foreground" `
Foreground string ` toml:"foreground" `
Background string ` toml:"background" `
Background string ` toml:"background" `
@ -51,12 +61,14 @@ type Style struct {
Inverse bool ` toml:"inverse" `
Inverse bool ` toml:"inverse" `
}
}
// Channels holds the style information for various elements of a channel
type Channels struct {
type Channels struct {
Basic Style ` toml:"basic" `
Basic Style ` toml:"basic" `
Header Style ` toml:"header" `
Header Style ` toml:"header" `
Unread Style ` toml:"unread" `
Unread Style ` toml:"unread" `
}
}
// Message holds the style information for various elements of a message
type Message struct {
type Message struct {
Body Style ` toml:"body" `
Body Style ` toml:"body" `
Header Style ` toml:"header" `
Header Style ` toml:"header" `
@ -72,13 +84,8 @@ type Message struct {
Code Style ` toml:"code" `
Code Style ` toml:"code" `
}
}
// Feed holds the style information for various elements of the feed window
type Feed struct {
type Feed struct {
Basic Style ` toml:"basic" `
Basic Style ` toml:"basic" `
Error Style ` toml:"error" `
Error Style ` toml:"error" `
}
}
type Colors struct {
Channels Channels ` toml:"channels" `
Message Message ` toml:"message" `
Feed Feed ` toml:"feed" `
}