mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 15:17:47 +00:00
FEATURE: add term-dark
and term-light
themes from main nushell
(#500)
* add `term-dark` and `term-light` themes from main `nushell` * rename the themes: `{term=>nushell}-{dark,light}`
This commit is contained in:
parent
ebc16108fb
commit
771586844f
2 changed files with 166 additions and 0 deletions
83
themes/themes/nushell-dark.nu
Normal file
83
themes/themes/nushell-dark.nu
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
export def main [] { return {
|
||||||
|
# color for nushell primitives
|
||||||
|
separator: white
|
||||||
|
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
|
||||||
|
header: green_bold
|
||||||
|
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' } }
|
||||||
|
int: white
|
||||||
|
filesize: {|e|
|
||||||
|
if $e == 0b {
|
||||||
|
'white'
|
||||||
|
} else if $e < 1mb {
|
||||||
|
'cyan'
|
||||||
|
} else { 'blue' }
|
||||||
|
}
|
||||||
|
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' }
|
||||||
|
}
|
||||||
|
range: white
|
||||||
|
float: white
|
||||||
|
string: white
|
||||||
|
nothing: white
|
||||||
|
binary: white
|
||||||
|
cellpath: white
|
||||||
|
row_index: green_bold
|
||||||
|
record: white
|
||||||
|
list: white
|
||||||
|
block: white
|
||||||
|
hints: dark_gray
|
||||||
|
|
||||||
|
shape_and: purple_bold
|
||||||
|
shape_binary: purple_bold
|
||||||
|
shape_block: blue_bold
|
||||||
|
shape_bool: light_cyan
|
||||||
|
shape_closure: green_bold
|
||||||
|
shape_custom: green
|
||||||
|
shape_datetime: cyan_bold
|
||||||
|
shape_directory: cyan
|
||||||
|
shape_external: cyan
|
||||||
|
shape_externalarg: green_bold
|
||||||
|
shape_filepath: cyan
|
||||||
|
shape_flag: blue_bold
|
||||||
|
shape_float: purple_bold
|
||||||
|
# shapes are used to change the cli syntax highlighting
|
||||||
|
shape_garbage: { fg: white bg: red attr: b}
|
||||||
|
shape_globpattern: cyan_bold
|
||||||
|
shape_int: purple_bold
|
||||||
|
shape_internalcall: cyan_bold
|
||||||
|
shape_list: cyan_bold
|
||||||
|
shape_literal: blue
|
||||||
|
shape_match_pattern: green
|
||||||
|
shape_matching_brackets: { attr: u }
|
||||||
|
shape_nothing: light_cyan
|
||||||
|
shape_operator: yellow
|
||||||
|
shape_or: purple_bold
|
||||||
|
shape_pipe: purple_bold
|
||||||
|
shape_range: yellow_bold
|
||||||
|
shape_record: cyan_bold
|
||||||
|
shape_redirection: purple_bold
|
||||||
|
shape_signature: green_bold
|
||||||
|
shape_string: green
|
||||||
|
shape_string_interpolation: cyan_bold
|
||||||
|
shape_table: blue_bold
|
||||||
|
shape_variable: purple
|
||||||
|
shape_vardecl: purple
|
||||||
|
}}
|
83
themes/themes/nushell-light.nu
Normal file
83
themes/themes/nushell-light.nu
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
export def main [] { return {
|
||||||
|
# color for nushell primitives
|
||||||
|
separator: dark_gray
|
||||||
|
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
|
||||||
|
header: green_bold
|
||||||
|
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' } }
|
||||||
|
int: dark_gray
|
||||||
|
filesize: {|e|
|
||||||
|
if $e == 0b {
|
||||||
|
'dark_gray'
|
||||||
|
} else if $e < 1mb {
|
||||||
|
'cyan_bold'
|
||||||
|
} else { 'blue_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' }
|
||||||
|
}
|
||||||
|
range: dark_gray
|
||||||
|
float: dark_gray
|
||||||
|
string: dark_gray
|
||||||
|
nothing: dark_gray
|
||||||
|
binary: dark_gray
|
||||||
|
cellpath: dark_gray
|
||||||
|
row_index: green_bold
|
||||||
|
record: white
|
||||||
|
list: white
|
||||||
|
block: white
|
||||||
|
hints: dark_gray
|
||||||
|
|
||||||
|
shape_and: purple_bold
|
||||||
|
shape_binary: purple_bold
|
||||||
|
shape_block: blue_bold
|
||||||
|
shape_bool: light_cyan
|
||||||
|
shape_closure: green_bold
|
||||||
|
shape_custom: green
|
||||||
|
shape_datetime: cyan_bold
|
||||||
|
shape_directory: cyan
|
||||||
|
shape_external: cyan
|
||||||
|
shape_externalarg: green_bold
|
||||||
|
shape_filepath: cyan
|
||||||
|
shape_flag: blue_bold
|
||||||
|
shape_float: purple_bold
|
||||||
|
# shapes are used to change the cli syntax highlighting
|
||||||
|
shape_garbage: { fg: white bg: red attr: b}
|
||||||
|
shape_globpattern: cyan_bold
|
||||||
|
shape_int: purple_bold
|
||||||
|
shape_internalcall: cyan_bold
|
||||||
|
shape_list: cyan_bold
|
||||||
|
shape_literal: blue
|
||||||
|
shape_match_pattern: green
|
||||||
|
shape_matching_brackets: { attr: u }
|
||||||
|
shape_nothing: light_cyan
|
||||||
|
shape_operator: yellow
|
||||||
|
shape_or: purple_bold
|
||||||
|
shape_pipe: purple_bold
|
||||||
|
shape_range: yellow_bold
|
||||||
|
shape_record: cyan_bold
|
||||||
|
shape_redirection: purple_bold
|
||||||
|
shape_signature: green_bold
|
||||||
|
shape_string: green
|
||||||
|
shape_string_interpolation: cyan_bold
|
||||||
|
shape_table: blue_bold
|
||||||
|
shape_variable: purple
|
||||||
|
shape_vardecl: purple
|
||||||
|
}}
|
Loading…
Add table
Add a link
Reference in a new issue