nushell: Add light theme support
This commit is contained in:
175
tree/.config/nushell/theme.nu.tpl
Normal file
175
tree/.config/nushell/theme.nu.tpl
Normal file
@ -0,0 +1,175 @@
|
||||
# gruvbox-dark
|
||||
let dark_theme = {
|
||||
separator: "#a89984"
|
||||
leading_trailing_space_bg: { attr: "n" }
|
||||
header: { fg: "#98971a" attr: "b" }
|
||||
empty: "#458588"
|
||||
bool: {|| if $in { "#8ec07c" } else { "light_gray" } }
|
||||
int: "#a89984"
|
||||
filesize: {|e|
|
||||
if $e == 0b {
|
||||
"#a89984"
|
||||
} else if $e < 1mb {
|
||||
"#689d6a"
|
||||
} else {{ fg: "#458588" }}
|
||||
}
|
||||
duration: "#a89984"
|
||||
date: {|| (date now) - $in |
|
||||
if $in < 1hr {
|
||||
{ fg: "#cc241d" attr: "b" }
|
||||
} else if $in < 6hr {
|
||||
"#cc241d"
|
||||
} else if $in < 1day {
|
||||
"#d79921"
|
||||
} else if $in < 3day {
|
||||
"#98971a"
|
||||
} else if $in < 1wk {
|
||||
{ fg: "#98971a" attr: "b" }
|
||||
} else if $in < 6wk {
|
||||
"#689d6a"
|
||||
} else if $in < 52wk {
|
||||
"#458588"
|
||||
} else { "dark_gray" }
|
||||
}
|
||||
range: "#a89984"
|
||||
float: "#a89984"
|
||||
string: "#a89984"
|
||||
nothing: "#a89984"
|
||||
binary: "#a89984"
|
||||
cellpath: "#a89984"
|
||||
row_index: { fg: "#98971a" attr: "b" }
|
||||
record: "#a89984"
|
||||
list: "#a89984"
|
||||
block: "#a89984"
|
||||
hints: "dark_gray"
|
||||
search_result: { fg: "#cc241d" bg: "#a89984" }
|
||||
|
||||
shape_and: { fg: "#b16286" attr: "b" }
|
||||
shape_binary: { fg: "#b16286" attr: "b" }
|
||||
shape_block: { fg: "#458588" attr: "b" }
|
||||
shape_bool: "#8ec07c"
|
||||
shape_custom: "#98971a"
|
||||
shape_datetime: { fg: "#689d6a" attr: "b" }
|
||||
shape_directory: "#689d6a"
|
||||
shape_external: "#689d6a"
|
||||
shape_externalarg: { fg: "#98971a" attr: "b" }
|
||||
shape_filepath: "#689d6a"
|
||||
shape_flag: { fg: "#458588" attr: "b" }
|
||||
shape_float: { fg: "#b16286" attr: "b" }
|
||||
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: "b" }
|
||||
shape_globpattern: { fg: "#689d6a" attr: "b" }
|
||||
shape_int: { fg: "#b16286" attr: "b" }
|
||||
shape_internalcall: { fg: "#689d6a" attr: "b" }
|
||||
shape_list: { fg: "#689d6a" attr: "b" }
|
||||
shape_literal: "#458588"
|
||||
shape_match_pattern: "#98971a"
|
||||
shape_matching_brackets: { attr: "u" }
|
||||
shape_nothing: "#8ec07c"
|
||||
shape_operator: "#d79921"
|
||||
shape_or: { fg: "#b16286" attr: "b" }
|
||||
shape_pipe: { fg: "#b16286" attr: "b" }
|
||||
shape_range: { fg: "#d79921" attr: "b" }
|
||||
shape_record: { fg: "#689d6a" attr: "b" }
|
||||
shape_redirection: { fg: "#b16286" attr: "b" }
|
||||
shape_signature: { fg: "#98971a" attr: "b" }
|
||||
shape_string: "#98971a"
|
||||
shape_string_interpolation: { fg: "#689d6a" attr: "b" }
|
||||
shape_table: { fg: "#458588" attr: "b" }
|
||||
shape_variable: "#b16286"
|
||||
|
||||
background: "#282828"
|
||||
foreground: "#ebdbb2"
|
||||
cursor: "#ebdbb2"
|
||||
}
|
||||
|
||||
# gruvbox-light-hard
|
||||
let light_theme = {
|
||||
separator: "#504945"
|
||||
leading_trailing_space_bg: { attr: "n" }
|
||||
header: { fg: "#79740e" attr: "b" }
|
||||
empty: "#076678"
|
||||
bool: {|| if $in { "#427b58" } else { "light_gray" } }
|
||||
int: "#504945"
|
||||
filesize: {|e|
|
||||
if $e == 0b {
|
||||
"#504945"
|
||||
} else if $e < 1mb {
|
||||
"#427b58"
|
||||
} else {{ fg: "#076678" }}
|
||||
}
|
||||
duration: "#504945"
|
||||
date: {|| (date now) - $in |
|
||||
if $in < 1hr {
|
||||
{ fg: "#9d0006" attr: "b" }
|
||||
} else if $in < 6hr {
|
||||
"#9d0006"
|
||||
} else if $in < 1day {
|
||||
"#b57614"
|
||||
} else if $in < 3day {
|
||||
"#79740e"
|
||||
} else if $in < 1wk {
|
||||
{ fg: "#79740e" attr: "b" }
|
||||
} else if $in < 6wk {
|
||||
"#427b58"
|
||||
} else if $in < 52wk {
|
||||
"#076678"
|
||||
} else { "dark_gray" }
|
||||
}
|
||||
range: "#504945"
|
||||
float: "#504945"
|
||||
string: "#504945"
|
||||
nothing: "#504945"
|
||||
binary: "#504945"
|
||||
cellpath: "#504945"
|
||||
row_index: { fg: "#79740e" attr: "b" }
|
||||
record: "#504945"
|
||||
list: "#504945"
|
||||
block: "#504945"
|
||||
hints: "dark_gray"
|
||||
search_result: { fg: "#9d0006" bg: "#504945" }
|
||||
|
||||
shape_and: { fg: "#8f3f71" attr: "b" }
|
||||
shape_binary: { fg: "#8f3f71" attr: "b" }
|
||||
shape_block: { fg: "#076678" attr: "b" }
|
||||
shape_bool: "#427b58"
|
||||
shape_custom: "#79740e"
|
||||
shape_datetime: { fg: "#427b58" attr: "b" }
|
||||
shape_directory: "#427b58"
|
||||
shape_external: "#427b58"
|
||||
shape_externalarg: { fg: "#79740e" attr: "b" }
|
||||
shape_filepath: "#427b58"
|
||||
shape_flag: { fg: "#076678" attr: "b" }
|
||||
shape_float: { fg: "#8f3f71" attr: "b" }
|
||||
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: "b" }
|
||||
shape_globpattern: { fg: "#427b58" attr: "b" }
|
||||
shape_int: { fg: "#8f3f71" attr: "b" }
|
||||
shape_internalcall: { fg: "#427b58" attr: "b" }
|
||||
shape_list: { fg: "#427b58" attr: "b" }
|
||||
shape_literal: "#076678"
|
||||
shape_match_pattern: "#79740e"
|
||||
shape_matching_brackets: { attr: "u" }
|
||||
shape_nothing: "#427b58"
|
||||
shape_operator: "#b57614"
|
||||
shape_or: { fg: "#8f3f71" attr: "b" }
|
||||
shape_pipe: { fg: "#8f3f71" attr: "b" }
|
||||
shape_range: { fg: "#b57614" attr: "b" }
|
||||
shape_record: { fg: "#427b58" attr: "b" }
|
||||
shape_redirection: { fg: "#8f3f71" attr: "b" }
|
||||
shape_signature: { fg: "#79740e" attr: "b" }
|
||||
shape_string: "#79740e"
|
||||
shape_string_interpolation: { fg: "#427b58" attr: "b" }
|
||||
shape_table: { fg: "#076678" attr: "b" }
|
||||
shape_variable: "#8f3f71"
|
||||
|
||||
background: "#f9f5d7"
|
||||
foreground: "#504945"
|
||||
cursor: "#504945"
|
||||
}
|
||||
|
||||
{% if light %}
|
||||
let color_config = $light_theme
|
||||
$env.LS_COLORS = (vivid generate gruvbox-light-hard | str trim)
|
||||
{% else %}
|
||||
let color_config = $dark_theme
|
||||
$env.LS_COLORS = (vivid generate gruvbox-dark | str trim)
|
||||
{% end %}
|
||||
Reference in New Issue
Block a user