set dynamic parts of $env.config.explore with the theme

This commit is contained in:
amtoine 2023-07-13 19:42:49 +02:00
parent 173bdbba5b
commit b9622084c9
No known key found for this signature in database
GPG Key ID: 37AAE9B486CFF1AB

View File

@ -176,6 +176,8 @@ let light_theme = {
shape_vardecl: purple shape_vardecl: purple
} }
$env.config.color_config = $dark_theme # if you want a light theme, replace `$dark_theme` to `$light_theme`
# External completer example # External completer example
# let carapace_completer = {|spans| # let carapace_completer = {|spans|
# carapace $spans.0 nushell $spans | from json # carapace $spans.0 nushell $spans | from json
@ -220,7 +222,7 @@ $env.config = {
explore: { explore: {
try: { try: {
border_color: {fg: "white"} # $env.config.color_config.separator border_color: ($env.config?.color_config?.separator? | default "gray")
}, },
status_bar_background: {fg: "#1D1F21", bg: "#C4C9C6"}, status_bar_background: {fg: "#1D1F21", bg: "#C4C9C6"},
command_bar_text: {fg: "#C4C9C6"}, command_bar_text: {fg: "#C4C9C6"},
@ -242,7 +244,7 @@ $env.config = {
line_index: true, line_index: true,
}, },
config: { config: {
border_color: {fg: "white"} # $env.config.color_config.separator border_color: ($env.config?.color_config?.separator? | default "gray")
cursor_color: {fg: "black", bg: "light_yellow"} cursor_color: {fg: "black", bg: "light_yellow"}
}, },
} }
@ -277,7 +279,6 @@ $env.config = {
vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line (underscore is the default) vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line (underscore is the default)
} }
color_config: $dark_theme # if you want a light theme, replace `$dark_theme` to `$light_theme`
use_grid_icons: true use_grid_icons: true
footer_mode: "25" # always, never, number_of_rows, auto footer_mode: "25" # always, never, number_of_rows, auto
float_precision: 2 # the precision for displaying floats in tables float_precision: 2 # the precision for displaying floats in tables