mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-24 08:52:21 +02:00
use better colour defaults
This commit is contained in:
parent
34404162e6
commit
1ac3ae1ad1
@ -29,7 +29,6 @@ gui:
|
||||
language: 'auto' # one of 'auto' | 'en' | 'zh' | 'pl' | 'nl' | 'ja' | 'ko'
|
||||
timeFormat: '02 Jan 06 15:04 MST' # https://pkg.go.dev/time#Time.Format
|
||||
theme:
|
||||
lightTheme: false # For terminals with a light background
|
||||
activeBorderColor:
|
||||
- green
|
||||
- bold
|
||||
@ -344,23 +343,6 @@ The available attributes are:
|
||||
- reverse # useful for high-contrast
|
||||
- underline
|
||||
|
||||
## Light terminal theme
|
||||
|
||||
If you have issues with a light terminal theme where you can't read / see the text add these settings
|
||||
|
||||
```yaml
|
||||
gui:
|
||||
theme:
|
||||
lightTheme: true
|
||||
activeBorderColor:
|
||||
- black
|
||||
- bold
|
||||
inactiveBorderColor:
|
||||
- black
|
||||
selectedLineBgColor:
|
||||
- default
|
||||
```
|
||||
|
||||
## Highlighting the selected line
|
||||
|
||||
If you don't like the default behaviour of highlighting the selected line with a blue background, you can use the `selectedLineBgColor` and `selectedRangeBgColor` keys to customise the behaviour. If you just want to embolden the selected line (this was the original default), you can do the following:
|
||||
|
@ -55,7 +55,6 @@ type GuiConfig struct {
|
||||
}
|
||||
|
||||
type ThemeConfig struct {
|
||||
LightTheme bool `yaml:"lightTheme"`
|
||||
ActiveBorderColor []string `yaml:"activeBorderColor"`
|
||||
InactiveBorderColor []string `yaml:"inactiveBorderColor"`
|
||||
OptionsTextColor []string `yaml:"optionsTextColor"`
|
||||
@ -358,9 +357,8 @@ func GetDefaultConfig() *UserConfig {
|
||||
Language: "auto",
|
||||
TimeFormat: time.RFC822,
|
||||
Theme: ThemeConfig{
|
||||
LightTheme: false,
|
||||
ActiveBorderColor: []string{"green", "bold"},
|
||||
InactiveBorderColor: []string{"white"},
|
||||
InactiveBorderColor: []string{"default"},
|
||||
OptionsTextColor: []string{"blue"},
|
||||
SelectedLineBgColor: []string{"blue"},
|
||||
SelectedRangeBgColor: []string{"blue"},
|
||||
|
@ -27,6 +27,7 @@ var (
|
||||
BgBlue = FromBasicBg(color.BgBlue)
|
||||
BgMagenta = FromBasicBg(color.BgMagenta)
|
||||
BgCyan = FromBasicBg(color.BgCyan)
|
||||
BgDefault = FromBasicBg(color.BgDefault)
|
||||
|
||||
// will not print any colour escape codes, including the reset escape code
|
||||
Nothing = New()
|
||||
|
@ -24,9 +24,6 @@ var (
|
||||
// DefaultTextColor is the default text color
|
||||
DefaultTextColor = style.FgWhite
|
||||
|
||||
// DefaultHiTextColor is the default highlighted text color
|
||||
DefaultHiTextColor = style.FgLightWhite
|
||||
|
||||
// SelectedLineBgColor is the background color for the selected line
|
||||
SelectedLineBgColor = style.New()
|
||||
|
||||
@ -61,14 +58,6 @@ func UpdateTheme(themeConfig config.ThemeConfig) {
|
||||
OptionsColor = GetGocuiStyle(themeConfig.OptionsTextColor)
|
||||
OptionsFgColor = GetTextStyle(themeConfig.OptionsTextColor, false)
|
||||
|
||||
isLightTheme := themeConfig.LightTheme
|
||||
if isLightTheme {
|
||||
DefaultTextColor = style.FgBlack
|
||||
DefaultHiTextColor = style.FgBlackLighter
|
||||
GocuiDefaultTextColor = gocui.ColorBlack
|
||||
} else {
|
||||
DefaultTextColor = style.FgWhite
|
||||
DefaultHiTextColor = style.FgLightWhite
|
||||
GocuiDefaultTextColor = gocui.ColorWhite
|
||||
}
|
||||
DefaultTextColor = style.FgDefault
|
||||
GocuiDefaultTextColor = gocui.ColorDefault
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user