diff --git a/config/mod.go b/config/mod.go index 7544676..6577b29 100644 --- a/config/mod.go +++ b/config/mod.go @@ -8,13 +8,15 @@ import ( ) type Config struct { - Keybindings KeybindingsConfig `toml:"keybindings"` General GeneralConfig `toml:"general"` + Theme ThemeConfig `toml:"theme"` + Keybindings KeybindingsConfig `toml:"keybindings"` } func newConfig() Config { return Config{ General: newGeneralConfig(), + Theme: newThemeConfig(), Keybindings: newKeybindingsConfig(), } } diff --git a/config/theme.go b/config/theme.go new file mode 100644 index 0000000..4139122 --- /dev/null +++ b/config/theme.go @@ -0,0 +1,15 @@ +package config + +type ThemeConfig struct { + Background string `toml:"background"` + Border string `toml:"border"` + Title string `toml:"title"` +} + +func newThemeConfig() ThemeConfig { + return ThemeConfig{ + Background: "black", + Border: "white", + Title: "white", + } +} diff --git a/main.go b/main.go index 0e21d8b..591b8b7 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "github.com/ayntgl/discordo/discord" "github.com/ayntgl/discordo/ui" + "github.com/gdamore/tcell/v2" "github.com/rivo/tview" "github.com/zalando/go-keyring" ) @@ -95,6 +96,10 @@ func main() { tview.Borders.Horizontal = 0 tview.Borders.Vertical = 0 + tview.Styles.PrimitiveBackgroundColor = tcell.GetColor(app.Config.Theme.Background) + tview.Styles.BorderColor = tcell.GetColor(app.Config.Theme.Border) + tview.Styles.TitleColor = tcell.GetColor(app.Config.Theme.Title) + err := app.Run() if err != nil { panic(err)