diff --git a/config.go b/config.go index 9bb7b3b..a7033b7 100644 --- a/config.go +++ b/config.go @@ -4,6 +4,7 @@ import ( "os" "github.com/BurntSushi/toml" + "github.com/rivo/tview" ) const userAgent = "" + @@ -69,14 +70,37 @@ type theme struct { Text themeText } +type borders struct { + Horizontal rune + Vertical rune + TopLeft rune + TopRight rune + BottomLeft rune + BottomRight rune + + LeftT rune + RightT rune + TopT rune + BottomT rune + Cross rune + + HorizontalFocus rune + VerticalFocus rune + TopLeftFocus rune + TopRightFocus rune + BottomLeftFocus rune + BottomRightFocus rune +} + type config struct { Token string + UserAgent string Mouse bool Notifications bool - UserAgent string GetMessagesLimit int Theme theme Keybindings keybindings + Borders borders } func loadConfig() *config { @@ -133,6 +157,7 @@ func loadConfig() *config { Focus: "Alt+Rune[3]", }, } + c.Borders = tview.Borders err = toml.NewEncoder(f).Encode(c) if err != nil { diff --git a/main.go b/main.go index 989d34e..99806d3 100644 --- a/main.go +++ b/main.go @@ -24,6 +24,7 @@ var ( func main() { conf = loadConfig() + tview.Borders = conf.Borders tview.Styles.PrimitiveBackgroundColor = tcell.GetColor(conf.Theme.Background.Primitive) tview.Styles.ContrastBackgroundColor = tcell.GetColor(conf.Theme.Background.Contrast) tview.Styles.MoreContrastBackgroundColor = tcell.GetColor(conf.Theme.Background.MoreContrast)