From 58cf6de313f2aabd0ba974cf0df29cf061b6022c Mon Sep 17 00:00:00 2001 From: ayn2op Date: Mon, 23 Jan 2023 23:01:19 +0530 Subject: [PATCH] Clarify configuration fields --- guilds_tree.go | 7 +++---- internal/config/config.go | 6 +++--- internal/config/theme.go | 1 + 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/guilds_tree.go b/guilds_tree.go index a2cb190..f6ebeeb 100644 --- a/guilds_tree.go +++ b/guilds_tree.go @@ -27,12 +27,11 @@ func newGuildsTree() *GuildsTree { root: tview.NewTreeNode(""), } - gt.SetGraphics(config.Current.Theme.GuildsTree.Graphics) - gt.SetRoot(gt.root) gt.SetTopLevel(1) - gt.SetSelectedFunc(gt.onSelected) - + gt.SetRoot(gt.root) + gt.SetGraphics(config.Current.Theme.GuildsTree.Graphics) gt.SetBackgroundColor(tcell.GetColor(config.Current.Theme.BackgroundColor)) + gt.SetSelectedFunc(gt.onSelected) gt.SetTitle("Guilds") gt.SetTitleColor(tcell.GetColor(config.Current.Theme.TitleColor)) diff --git a/internal/config/config.go b/internal/config/config.go index ab4abe6..09fdb40 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -14,11 +14,11 @@ var Current = defConfig() type Config struct { // Mouse indicates whether the mouse is usable or not. Mouse bool `yaml:"mouse"` - // MessagesLimit is the number of messages to be retrieved when a text-based channel is selected. + // MessagesLimit is the number of messages to fetch when a text-based channel is selected. MessagesLimit uint `yaml:"messages_limit"` - // Timestamps indicates whether the message is to be prefixed with the timestamp or not. + // Timestamps indicates whether to draw the timestamp in front of the message or not. Timestamps bool `yaml:"timestamps"` - // Editor is the editor program to open when the `LaunchEditor` key is pressed. If the value of the field is "default", the `$EDITOR` environment variable is used instead. + // Editor is the program to open when the `LaunchEditor` key is pressed. If the value of the field is "default", the `$EDITOR` environment variable is used instead. Editor string `yaml:"editor"` Keys Keys `yaml:"keys"` diff --git a/internal/config/theme.go b/internal/config/theme.go index a4a7671..ddece7f 100644 --- a/internal/config/theme.go +++ b/internal/config/theme.go @@ -2,6 +2,7 @@ package config type ( GuildsTreeTheme struct { + // Graphics indicates whether to draw the line graphics to illustrate the hierarchy or not. Graphics bool `yaml:"graphics"` }