mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-28 09:08:41 +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'
|
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
|
timeFormat: '02 Jan 06 15:04 MST' # https://pkg.go.dev/time#Time.Format
|
||||||
theme:
|
theme:
|
||||||
lightTheme: false # For terminals with a light background
|
|
||||||
activeBorderColor:
|
activeBorderColor:
|
||||||
- green
|
- green
|
||||||
- bold
|
- bold
|
||||||
@ -344,23 +343,6 @@ The available attributes are:
|
|||||||
- reverse # useful for high-contrast
|
- reverse # useful for high-contrast
|
||||||
- underline
|
- 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
|
## 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:
|
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 {
|
type ThemeConfig struct {
|
||||||
LightTheme bool `yaml:"lightTheme"`
|
|
||||||
ActiveBorderColor []string `yaml:"activeBorderColor"`
|
ActiveBorderColor []string `yaml:"activeBorderColor"`
|
||||||
InactiveBorderColor []string `yaml:"inactiveBorderColor"`
|
InactiveBorderColor []string `yaml:"inactiveBorderColor"`
|
||||||
OptionsTextColor []string `yaml:"optionsTextColor"`
|
OptionsTextColor []string `yaml:"optionsTextColor"`
|
||||||
@ -358,9 +357,8 @@ func GetDefaultConfig() *UserConfig {
|
|||||||
Language: "auto",
|
Language: "auto",
|
||||||
TimeFormat: time.RFC822,
|
TimeFormat: time.RFC822,
|
||||||
Theme: ThemeConfig{
|
Theme: ThemeConfig{
|
||||||
LightTheme: false,
|
|
||||||
ActiveBorderColor: []string{"green", "bold"},
|
ActiveBorderColor: []string{"green", "bold"},
|
||||||
InactiveBorderColor: []string{"white"},
|
InactiveBorderColor: []string{"default"},
|
||||||
OptionsTextColor: []string{"blue"},
|
OptionsTextColor: []string{"blue"},
|
||||||
SelectedLineBgColor: []string{"blue"},
|
SelectedLineBgColor: []string{"blue"},
|
||||||
SelectedRangeBgColor: []string{"blue"},
|
SelectedRangeBgColor: []string{"blue"},
|
||||||
|
@ -27,6 +27,7 @@ var (
|
|||||||
BgBlue = FromBasicBg(color.BgBlue)
|
BgBlue = FromBasicBg(color.BgBlue)
|
||||||
BgMagenta = FromBasicBg(color.BgMagenta)
|
BgMagenta = FromBasicBg(color.BgMagenta)
|
||||||
BgCyan = FromBasicBg(color.BgCyan)
|
BgCyan = FromBasicBg(color.BgCyan)
|
||||||
|
BgDefault = FromBasicBg(color.BgDefault)
|
||||||
|
|
||||||
// will not print any colour escape codes, including the reset escape code
|
// will not print any colour escape codes, including the reset escape code
|
||||||
Nothing = New()
|
Nothing = New()
|
||||||
|
@ -24,9 +24,6 @@ var (
|
|||||||
// DefaultTextColor is the default text color
|
// DefaultTextColor is the default text color
|
||||||
DefaultTextColor = style.FgWhite
|
DefaultTextColor = style.FgWhite
|
||||||
|
|
||||||
// DefaultHiTextColor is the default highlighted text color
|
|
||||||
DefaultHiTextColor = style.FgLightWhite
|
|
||||||
|
|
||||||
// SelectedLineBgColor is the background color for the selected line
|
// SelectedLineBgColor is the background color for the selected line
|
||||||
SelectedLineBgColor = style.New()
|
SelectedLineBgColor = style.New()
|
||||||
|
|
||||||
@ -61,14 +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)
|
||||||
|
|
||||||
isLightTheme := themeConfig.LightTheme
|
DefaultTextColor = style.FgDefault
|
||||||
if isLightTheme {
|
GocuiDefaultTextColor = gocui.ColorDefault
|
||||||
DefaultTextColor = style.FgBlack
|
|
||||||
DefaultHiTextColor = style.FgBlackLighter
|
|
||||||
GocuiDefaultTextColor = gocui.ColorBlack
|
|
||||||
} else {
|
|
||||||
DefaultTextColor = style.FgWhite
|
|
||||||
DefaultHiTextColor = style.FgLightWhite
|
|
||||||
GocuiDefaultTextColor = gocui.ColorWhite
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user