1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-05-31 23:19:40 +02:00

Merge pull request #2284 from arnaudperalta/defaultfgcolor-config

Closes https://github.com/jesseduffield/lazygit/issues/2279
This commit is contained in:
Jesse Duffield 2022-11-26 13:41:41 +11:00 committed by GitHub
commit f96246c038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -46,6 +46,8 @@ gui:
- blue - blue
unstagedChangesColor: unstagedChangesColor:
- red - red
defaultFgColor:
- default
commitLength: commitLength:
show: true show: true
mouseEvents: true mouseEvents: true

View File

@ -63,6 +63,7 @@ type ThemeConfig struct {
CherryPickedCommitBgColor []string `yaml:"cherryPickedCommitBgColor"` CherryPickedCommitBgColor []string `yaml:"cherryPickedCommitBgColor"`
CherryPickedCommitFgColor []string `yaml:"cherryPickedCommitFgColor"` CherryPickedCommitFgColor []string `yaml:"cherryPickedCommitFgColor"`
UnstagedChangesColor []string `yaml:"unstagedChangesColor"` UnstagedChangesColor []string `yaml:"unstagedChangesColor"`
DefaultFgColor []string `yaml:"defaultFgColor"`
} }
type CommitLengthConfig struct { type CommitLengthConfig struct {
@ -365,6 +366,7 @@ func GetDefaultConfig() *UserConfig {
CherryPickedCommitBgColor: []string{"cyan"}, CherryPickedCommitBgColor: []string{"cyan"},
CherryPickedCommitFgColor: []string{"blue"}, CherryPickedCommitFgColor: []string{"blue"},
UnstagedChangesColor: []string{"red"}, UnstagedChangesColor: []string{"red"},
DefaultFgColor: []string{"default"},
}, },
CommitLength: CommitLengthConfig{Show: true}, CommitLength: CommitLengthConfig{Show: true},
SkipNoStagedFilesWarning: false, SkipNoStagedFilesWarning: false,

View File

@ -58,6 +58,6 @@ func UpdateTheme(themeConfig config.ThemeConfig) {
OptionsColor = GetGocuiStyle(themeConfig.OptionsTextColor) OptionsColor = GetGocuiStyle(themeConfig.OptionsTextColor)
OptionsFgColor = GetTextStyle(themeConfig.OptionsTextColor, false) OptionsFgColor = GetTextStyle(themeConfig.OptionsTextColor, false)
DefaultTextColor = style.FgDefault DefaultTextColor = GetTextStyle(themeConfig.DefaultFgColor, false)
GocuiDefaultTextColor = gocui.ColorDefault GocuiDefaultTextColor = GetGocuiStyle(themeConfig.DefaultFgColor)
} }