diff --git a/crates/nu-color-config/src/style_computer.rs b/crates/nu-color-config/src/style_computer.rs index 25d578573d..03ea07c07f 100644 --- a/crates/nu-color-config/src/style_computer.rs +++ b/crates/nu-color-config/src/style_computer.rs @@ -143,13 +143,13 @@ impl<'a> StyleComputer<'a> { let mut map: StyleMapping = [ ("separator".to_string(), ComputableStyle::Static(Color::White.normal())), ("leading_trailing_space_bg".to_string(), ComputableStyle::Static(Style::default().on(Color::Rgb(128, 128, 128)))), - ("header".to_string(), ComputableStyle::Static(Color::White.normal())), - ("empty".to_string(), ComputableStyle::Static(Color::White.normal())), - ("bool".to_string(), ComputableStyle::Static(Color::White.normal())), + ("header".to_string(), ComputableStyle::Static(Color::Green.bold())), + ("empty".to_string(), ComputableStyle::Static(Color::Blue.normal())), + ("bool".to_string(), ComputableStyle::Static(Color::LightCyan.normal())), ("int".to_string(), ComputableStyle::Static(Color::White.normal())), - ("filesize".to_string(), ComputableStyle::Static(Color::White.normal())), + ("filesize".to_string(), ComputableStyle::Static(Color::Cyan.normal())), ("duration".to_string(), ComputableStyle::Static(Color::White.normal())), - ("date".to_string(), ComputableStyle::Static(Color::White.normal())), + ("date".to_string(), ComputableStyle::Static(Color::Purple.normal())), ("range".to_string(), ComputableStyle::Static(Color::White.normal())), ("float".to_string(), ComputableStyle::Static(Color::White.normal())), ("string".to_string(), ComputableStyle::Static(Color::White.normal())), diff --git a/crates/nu-utils/src/sample_config/default_config.nu b/crates/nu-utils/src/sample_config/default_config.nu index 6273358f6d..101ce4728a 100644 --- a/crates/nu-utils/src/sample_config/default_config.nu +++ b/crates/nu-utils/src/sample_config/default_config.nu @@ -14,33 +14,12 @@ let dark_theme = { empty: blue # Closures can be used to choose colors for specific values. # The value (in this case, a bool) is piped into the closure. - bool: {|| if $in { 'light_cyan' } else { 'light_gray' } } + # eg) {|| if $in { 'light_cyan' } else { 'light_gray' } } + bool: light_cyan int: white - filesize: {|e| - if $e == 0b { - 'white' - } else if $e < 1mb { - 'cyan' - } else { 'blue' } - } + filesize: cyan duration: white - date: {|| (date now) - $in | - if $in < 1hr { - 'purple' - } else if $in < 6hr { - 'red' - } else if $in < 1day { - 'yellow' - } else if $in < 3day { - 'green' - } else if $in < 1wk { - 'light_green' - } else if $in < 6wk { - 'cyan' - } else if $in < 52wk { - 'blue' - } else { 'dark_gray' } - } + date: purple range: white float: white string: white @@ -98,33 +77,12 @@ let light_theme = { empty: blue # Closures can be used to choose colors for specific values. # The value (in this case, a bool) is piped into the closure. - bool: {|| if $in { 'dark_cyan' } else { 'dark_gray' } } + # eg) {|| if $in { 'dark_cyan' } else { 'dark_gray' } } + bool: dark_cyan int: dark_gray - filesize: {|e| - if $e == 0b { - 'dark_gray' - } else if $e < 1mb { - 'cyan_bold' - } else { 'blue_bold' } - } + filesize: cyan_bold duration: dark_gray - date: {|| (date now) - $in | - if $in < 1hr { - 'purple' - } else if $in < 6hr { - 'red' - } else if $in < 1day { - 'yellow' - } else if $in < 3day { - 'green' - } else if $in < 1wk { - 'light_green' - } else if $in < 6wk { - 'cyan' - } else if $in < 52wk { - 'blue' - } else { 'dark_gray' } - } + date: purple range: dark_gray float: dark_gray string: dark_gray @@ -275,7 +233,7 @@ $env.config = { vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line (underscore is the default) } - color_config: {} # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record + color_config: $dark_theme # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record use_grid_icons: true footer_mode: "25" # always, never, number_of_rows, auto float_precision: 2 # the precision for displaying floats in tables