feat: add selectedLineBgColor theme customization (#420)

This commit is contained in:
tiagovla 2023-07-21 05:31:27 -03:00 committed by GitHub
parent f0ee38f7f7
commit 454eaee2cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View file

@ -24,6 +24,8 @@ gui:
- bold - bold
inactiveBorderColor: inactiveBorderColor:
- white - white
selectedLineBgColor:
- blue
optionsTextColor: optionsTextColor:
- blue - blue
returnImmediately: false returnImmediately: false

View file

@ -71,6 +71,7 @@ type UserConfig struct {
type ThemeConfig struct { type ThemeConfig struct {
ActiveBorderColor []string `yaml:"activeBorderColor,omitempty"` ActiveBorderColor []string `yaml:"activeBorderColor,omitempty"`
InactiveBorderColor []string `yaml:"inactiveBorderColor,omitempty"` InactiveBorderColor []string `yaml:"inactiveBorderColor,omitempty"`
SelectedLineBgColor []string `yaml:"selectedLineBgColor,omitempty"`
OptionsTextColor []string `yaml:"optionsTextColor,omitempty"` OptionsTextColor []string `yaml:"optionsTextColor,omitempty"`
} }
@ -361,6 +362,7 @@ func GetDefaultConfig() UserConfig {
Theme: ThemeConfig{ Theme: ThemeConfig{
ActiveBorderColor: []string{"green", "bold"}, ActiveBorderColor: []string{"green", "bold"},
InactiveBorderColor: []string{"default"}, InactiveBorderColor: []string{"default"},
SelectedLineBgColor: []string{"blue"},
OptionsTextColor: []string{"blue"}, OptionsTextColor: []string{"blue"},
}, },
ShowAllContainers: false, ShowAllContainers: false,

View file

@ -101,7 +101,7 @@ func (gui *Gui) createAllViews() error {
(*mapping.viewPtr).FgColor = gocui.ColorDefault (*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 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. // 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.