Skip to content

Commit 1ac3ae1

Browse files
committed
use better colour defaults
1 parent 3440416 commit 1ac3ae1

File tree

4 files changed

+4
-34
lines changed

4 files changed

+4
-34
lines changed

docs/Config.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ gui:
2929
language: 'auto' # one of 'auto' | 'en' | 'zh' | 'pl' | 'nl' | 'ja' | 'ko'
3030
timeFormat: '02 Jan 06 15:04 MST' # https://pkg.go.dev/time#Time.Format
3131
theme:
32-
lightTheme: false # For terminals with a light background
3332
activeBorderColor:
3433
- green
3534
- bold
@@ -344,23 +343,6 @@ The available attributes are:
344343
- reverse # useful for high-contrast
345344
- underline
346345

347-
## Light terminal theme
348-
349-
If you have issues with a light terminal theme where you can't read / see the text add these settings
350-
351-
```yaml
352-
gui:
353-
theme:
354-
lightTheme: true
355-
activeBorderColor:
356-
- black
357-
- bold
358-
inactiveBorderColor:
359-
- black
360-
selectedLineBgColor:
361-
- default
362-
```
363-
364346
## Highlighting the selected line
365347

366348
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:

pkg/config/user_config.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ type GuiConfig struct {
5555
}
5656

5757
type ThemeConfig struct {
58-
LightTheme bool `yaml:"lightTheme"`
5958
ActiveBorderColor []string `yaml:"activeBorderColor"`
6059
InactiveBorderColor []string `yaml:"inactiveBorderColor"`
6160
OptionsTextColor []string `yaml:"optionsTextColor"`
@@ -358,9 +357,8 @@ func GetDefaultConfig() *UserConfig {
358357
Language: "auto",
359358
TimeFormat: time.RFC822,
360359
Theme: ThemeConfig{
361-
LightTheme: false,
362360
ActiveBorderColor: []string{"green", "bold"},
363-
InactiveBorderColor: []string{"white"},
361+
InactiveBorderColor: []string{"default"},
364362
OptionsTextColor: []string{"blue"},
365363
SelectedLineBgColor: []string{"blue"},
366364
SelectedRangeBgColor: []string{"blue"},

pkg/gui/style/basic_styles.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var (
2727
BgBlue = FromBasicBg(color.BgBlue)
2828
BgMagenta = FromBasicBg(color.BgMagenta)
2929
BgCyan = FromBasicBg(color.BgCyan)
30+
BgDefault = FromBasicBg(color.BgDefault)
3031

3132
// will not print any colour escape codes, including the reset escape code
3233
Nothing = New()

pkg/theme/theme.go

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ var (
2424
// DefaultTextColor is the default text color
2525
DefaultTextColor = style.FgWhite
2626

27-
// DefaultHiTextColor is the default highlighted text color
28-
DefaultHiTextColor = style.FgLightWhite
29-
3027
// SelectedLineBgColor is the background color for the selected line
3128
SelectedLineBgColor = style.New()
3229

@@ -61,14 +58,6 @@ func UpdateTheme(themeConfig config.ThemeConfig) {
6158
OptionsColor = GetGocuiStyle(themeConfig.OptionsTextColor)
6259
OptionsFgColor = GetTextStyle(themeConfig.OptionsTextColor, false)
6360

64-
isLightTheme := themeConfig.LightTheme
65-
if isLightTheme {
66-
DefaultTextColor = style.FgBlack
67-
DefaultHiTextColor = style.FgBlackLighter
68-
GocuiDefaultTextColor = gocui.ColorBlack
69-
} else {
70-
DefaultTextColor = style.FgWhite
71-
DefaultHiTextColor = style.FgLightWhite
72-
GocuiDefaultTextColor = gocui.ColorWhite
73-
}
61+
DefaultTextColor = style.FgDefault
62+
GocuiDefaultTextColor = gocui.ColorDefault
7463
}

0 commit comments

Comments
 (0)