Skip to content

Commit 454eaee

Browse files
authored
feat: add selectedLineBgColor theme customization (#420)
1 parent f0ee38f commit 454eaee

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

docs/Config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ gui:
2424
- bold
2525
inactiveBorderColor:
2626
- white
27+
selectedLineBgColor:
28+
- blue
2729
optionsTextColor:
2830
- blue
2931
returnImmediately: false

pkg/config/app_config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ type UserConfig struct {
7171
type ThemeConfig struct {
7272
ActiveBorderColor []string `yaml:"activeBorderColor,omitempty"`
7373
InactiveBorderColor []string `yaml:"inactiveBorderColor,omitempty"`
74+
SelectedLineBgColor []string `yaml:"selectedLineBgColor,omitempty"`
7475
OptionsTextColor []string `yaml:"optionsTextColor,omitempty"`
7576
}
7677

@@ -361,6 +362,7 @@ func GetDefaultConfig() UserConfig {
361362
Theme: ThemeConfig{
362363
ActiveBorderColor: []string{"green", "bold"},
363364
InactiveBorderColor: []string{"default"},
365+
SelectedLineBgColor: []string{"blue"},
364366
OptionsTextColor: []string{"blue"},
365367
},
366368
ShowAllContainers: false,

pkg/gui/views.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (gui *Gui) createAllViews() error {
101101
(*mapping.viewPtr).FgColor = gocui.ColorDefault
102102
}
103103

104-
selectedLineBgColor := gocui.ColorBlue
104+
selectedLineBgColor := GetGocuiStyle(gui.Config.UserConfig.Gui.Theme.SelectedLineBgColor)
105105

106106
gui.Views.Main.Wrap = gui.Config.UserConfig.Gui.WrapMainPanel
107107
// 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.

0 commit comments

Comments
 (0)