From 454eaee2cf6eb0949c8e2712eb5e956c8d9ae674 Mon Sep 17 00:00:00 2001 From: tiagovla <30515389+tiagovla@users.noreply.github.com> Date: Fri, 21 Jul 2023 05:31:27 -0300 Subject: [PATCH] feat: add selectedLineBgColor theme customization (#420) --- docs/Config.md | 2 ++ pkg/config/app_config.go | 2 ++ pkg/gui/views.go | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/Config.md b/docs/Config.md index 07daa8f0e..7b746c84a 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -24,6 +24,8 @@ gui: - bold inactiveBorderColor: - white + selectedLineBgColor: + - blue optionsTextColor: - blue returnImmediately: false diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go index ff8fcbb0a..f3a47db28 100644 --- a/pkg/config/app_config.go +++ b/pkg/config/app_config.go @@ -71,6 +71,7 @@ type UserConfig struct { type ThemeConfig struct { ActiveBorderColor []string `yaml:"activeBorderColor,omitempty"` InactiveBorderColor []string `yaml:"inactiveBorderColor,omitempty"` + SelectedLineBgColor []string `yaml:"selectedLineBgColor,omitempty"` OptionsTextColor []string `yaml:"optionsTextColor,omitempty"` } @@ -361,6 +362,7 @@ func GetDefaultConfig() UserConfig { Theme: ThemeConfig{ ActiveBorderColor: []string{"green", "bold"}, InactiveBorderColor: []string{"default"}, + SelectedLineBgColor: []string{"blue"}, OptionsTextColor: []string{"blue"}, }, ShowAllContainers: false, diff --git a/pkg/gui/views.go b/pkg/gui/views.go index efc0824d2..10558981c 100644 --- a/pkg/gui/views.go +++ b/pkg/gui/views.go @@ -101,7 +101,7 @@ func (gui *Gui) createAllViews() error { (*mapping.viewPtr).FgColor = gocui.ColorDefault } - selectedLineBgColor := gocui.ColorBlue + selectedLineBgColor := GetGocuiStyle(gui.Config.UserConfig.Gui.Theme.SelectedLineBgColor) gui.Views.Main.Wrap = gui.Config.UserConfig.Gui.WrapMainPanel // when you run a docker container with the -it flags (interactive mode) it adds carriage returns for some reason. This is not docker's fault, it's an os-level default.