Skip to content

Commit

Permalink
feat: add selectedLineBgColor theme customization (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagovla committed Jul 21, 2023
1 parent f0ee38f commit 454eaee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ gui:
- bold
inactiveBorderColor:
- white
selectedLineBgColor:
- blue
optionsTextColor:
- blue
returnImmediately: false
Expand Down
2 changes: 2 additions & 0 deletions pkg/config/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down Expand Up @@ -361,6 +362,7 @@ func GetDefaultConfig() UserConfig {
Theme: ThemeConfig{
ActiveBorderColor: []string{"green", "bold"},
InactiveBorderColor: []string{"default"},
SelectedLineBgColor: []string{"blue"},
OptionsTextColor: []string{"blue"},
},
ShowAllContainers: false,
Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/views.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check failure on line 104 in pkg/gui/views.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)

Check failure on line 104 in pkg/gui/views.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)

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.
Expand Down

0 comments on commit 454eaee

Please sign in to comment.