mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
fix: catppuccin themes declared a const
inside a record (#907)
This commit is contained in:
parent
59171b0fd9
commit
be32cdaefc
2 changed files with 168 additions and 164 deletions
|
@ -1,5 +1,5 @@
|
||||||
# Retrieve the theme settings
|
# Retrieve the theme settings
|
||||||
export def main [] { return {
|
export def main [] {
|
||||||
const color_palette = {
|
const color_palette = {
|
||||||
rosewater: "#dc8a78"
|
rosewater: "#dc8a78"
|
||||||
flamingo: "#dd7878"
|
flamingo: "#dd7878"
|
||||||
|
@ -29,89 +29,91 @@ export def main [] { return {
|
||||||
base: "#eff1f5"
|
base: "#eff1f5"
|
||||||
}
|
}
|
||||||
|
|
||||||
separator: $color_palette.overlay0
|
return {
|
||||||
leading_trailing_space_bg: { attr: "n" }
|
separator: $color_palette.overlay0
|
||||||
header: { fg: $color_palette.blue attr: "b" }
|
leading_trailing_space_bg: { attr: "n" }
|
||||||
empty: $color_palette.lavender
|
header: { fg: $color_palette.blue attr: "b" }
|
||||||
bool: $color_palette.lavender
|
empty: $color_palette.lavender
|
||||||
int: $color_palette.peach
|
bool: $color_palette.lavender
|
||||||
duration: $color_palette.text
|
int: $color_palette.peach
|
||||||
filesize: {|e|
|
duration: $color_palette.text
|
||||||
if $e < 1mb {
|
filesize: {|e|
|
||||||
$color_palette.green
|
if $e < 1mb {
|
||||||
} else if $e < 100mb {
|
$color_palette.green
|
||||||
$color_palette.yellow
|
} else if $e < 100mb {
|
||||||
} else if $e < 500mb {
|
$color_palette.yellow
|
||||||
$color_palette.peach
|
} else if $e < 500mb {
|
||||||
} else if $e < 800mb {
|
$color_palette.peach
|
||||||
$color_palette.maroon
|
} else if $e < 800mb {
|
||||||
} else if $e > 800mb {
|
$color_palette.maroon
|
||||||
$color_palette.red
|
} else if $e > 800mb {
|
||||||
|
$color_palette.red
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
date: {|| (date now) - $in |
|
||||||
date: {|| (date now) - $in |
|
if $in < 1hr {
|
||||||
if $in < 1hr {
|
$color_palette.green
|
||||||
$color_palette.green
|
} else if $in < 1day {
|
||||||
} else if $in < 1day {
|
$color_palette.yellow
|
||||||
$color_palette.yellow
|
} else if $in < 3day {
|
||||||
} else if $in < 3day {
|
$color_palette.peach
|
||||||
$color_palette.peach
|
} else if $in < 1wk {
|
||||||
} else if $in < 1wk {
|
$color_palette.maroon
|
||||||
$color_palette.maroon
|
} else if $in > 1wk {
|
||||||
} else if $in > 1wk {
|
$color_palette.red
|
||||||
$color_palette.red
|
}
|
||||||
}
|
}
|
||||||
|
range: $color_palette.text
|
||||||
|
float: $color_palette.text
|
||||||
|
string: $color_palette.text
|
||||||
|
nothing: $color_palette.text
|
||||||
|
binary: $color_palette.text
|
||||||
|
cellpath: $color_palette.text
|
||||||
|
row_index: { fg: $color_palette.mauve attr: "b" }
|
||||||
|
record: $color_palette.text
|
||||||
|
list: $color_palette.text
|
||||||
|
block: $color_palette.text
|
||||||
|
hints: $color_palette.overlay1
|
||||||
|
search_result: { fg: $color_palette.red bg: $color_palette.text }
|
||||||
|
|
||||||
|
shape_and: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_binary: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_block: { fg: $color_palette.blue attr: "b" }
|
||||||
|
shape_bool: $color_palette.teal
|
||||||
|
shape_custom: $color_palette.green
|
||||||
|
shape_datetime: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_directory: $color_palette.teal
|
||||||
|
shape_external: $color_palette.teal
|
||||||
|
shape_externalarg: { fg: $color_palette.green attr: "b" }
|
||||||
|
shape_filepath: $color_palette.teal
|
||||||
|
shape_flag: { fg: $color_palette.blue attr: "b" }
|
||||||
|
shape_float: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_garbage: { fg: $color_palette.text bg: $color_palette.red attr: "b" }
|
||||||
|
shape_globpattern: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_int: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_internalcall: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_list: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_literal: $color_palette.blue
|
||||||
|
shape_match_pattern: $color_palette.green
|
||||||
|
shape_matching_brackets: { attr: "u" }
|
||||||
|
shape_nothing: $color_palette.teal
|
||||||
|
shape_operator: $color_palette.peach
|
||||||
|
shape_or: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_pipe: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_range: { fg: $color_palette.peach attr: "b" }
|
||||||
|
shape_record: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_redirection: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_signature: { fg: $color_palette.green attr: "b" }
|
||||||
|
shape_string: $color_palette.green
|
||||||
|
shape_string_interpolation: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_table: { fg: $color_palette.blue attr: "b" }
|
||||||
|
shape_variable: $color_palette.pink
|
||||||
|
|
||||||
|
background: $color_palette.base
|
||||||
|
foreground: $color_palette.text
|
||||||
|
cursor: $color_palette.blue
|
||||||
}
|
}
|
||||||
range: $color_palette.text
|
}
|
||||||
float: $color_palette.text
|
|
||||||
string: $color_palette.text
|
|
||||||
nothing: $color_palette.text
|
|
||||||
binary: $color_palette.text
|
|
||||||
cellpath: $color_palette.text
|
|
||||||
row_index: { fg: $color_palette.mauve attr: "b" }
|
|
||||||
record: $color_palette.text
|
|
||||||
list: $color_palette.text
|
|
||||||
block: $color_palette.text
|
|
||||||
hints: $color_palette.overlay1
|
|
||||||
search_result: { fg: $color_palette.red bg: $color_palette.text }
|
|
||||||
|
|
||||||
shape_and: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_binary: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_block: { fg: $color_palette.blue attr: "b" }
|
|
||||||
shape_bool: $color_palette.teal
|
|
||||||
shape_custom: $color_palette.green
|
|
||||||
shape_datetime: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_directory: $color_palette.teal
|
|
||||||
shape_external: $color_palette.teal
|
|
||||||
shape_externalarg: { fg: $color_palette.green attr: "b" }
|
|
||||||
shape_filepath: $color_palette.teal
|
|
||||||
shape_flag: { fg: $color_palette.blue attr: "b" }
|
|
||||||
shape_float: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_garbage: { fg: $color_palette.text bg: $color_palette.red attr: "b" }
|
|
||||||
shape_globpattern: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_int: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_internalcall: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_list: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_literal: $color_palette.blue
|
|
||||||
shape_match_pattern: $color_palette.green
|
|
||||||
shape_matching_brackets: { attr: "u" }
|
|
||||||
shape_nothing: $color_palette.teal
|
|
||||||
shape_operator: $color_palette.peach
|
|
||||||
shape_or: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_pipe: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_range: { fg: $color_palette.peach attr: "b" }
|
|
||||||
shape_record: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_redirection: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_signature: { fg: $color_palette.green attr: "b" }
|
|
||||||
shape_string: $color_palette.green
|
|
||||||
shape_string_interpolation: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_table: { fg: $color_palette.blue attr: "b" }
|
|
||||||
shape_variable: $color_palette.pink
|
|
||||||
|
|
||||||
background: $color_palette.base
|
|
||||||
foreground: $color_palette.text
|
|
||||||
cursor: $color_palette.blue
|
|
||||||
}}
|
|
||||||
|
|
||||||
# Update the Nushell configuration
|
# Update the Nushell configuration
|
||||||
export def --env "set color_config" [] {
|
export def --env "set color_config" [] {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Retrieve the theme settings
|
# Retrieve the theme settings
|
||||||
export def main [] { return {
|
export def main [] {
|
||||||
const color_palette = {
|
const color_palette = {
|
||||||
rosewater: "#f5e0dc"
|
rosewater: "#f5e0dc"
|
||||||
flamingo: "#f2cdcd"
|
flamingo: "#f2cdcd"
|
||||||
|
@ -27,91 +27,93 @@ export def main [] { return {
|
||||||
base: "#1e1e2e"
|
base: "#1e1e2e"
|
||||||
mantle: "#181825"
|
mantle: "#181825"
|
||||||
crust: "#11111b"
|
crust: "#11111b"
|
||||||
}
|
|
||||||
|
|
||||||
separator: $color_palette.overlay0
|
|
||||||
leading_trailing_space_bg: { attr: "n" }
|
|
||||||
header: { fg: $color_palette.blue attr: "b" }
|
|
||||||
empty: $color_palette.lavender
|
|
||||||
bool: $color_palette.lavender
|
|
||||||
int: $color_palette.peach
|
|
||||||
duration: $color_palette.text
|
|
||||||
filesize: {|e|
|
|
||||||
if $e < 1mb {
|
|
||||||
$color_palette.green
|
|
||||||
} else if $e < 100mb {
|
|
||||||
$color_palette.yellow
|
|
||||||
} else if $e < 500mb {
|
|
||||||
$color_palette.peach
|
|
||||||
} else if $e < 800mb {
|
|
||||||
$color_palette.maroon
|
|
||||||
} else if $e > 800mb {
|
|
||||||
$color_palette.red
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
date: {|| (date now) - $in |
|
return {
|
||||||
if $in < 1hr {
|
separator: $color_palette.overlay0
|
||||||
$color_palette.green
|
leading_trailing_space_bg: { attr: "n" }
|
||||||
} else if $in < 1day {
|
header: { fg: $color_palette.blue attr: "b" }
|
||||||
$color_palette.yellow
|
empty: $color_palette.lavender
|
||||||
} else if $in < 3day {
|
bool: $color_palette.lavender
|
||||||
$color_palette.peach
|
int: $color_palette.peach
|
||||||
} else if $in < 1wk {
|
duration: $color_palette.text
|
||||||
$color_palette.maroon
|
filesize: {|e|
|
||||||
} else if $in > 1wk {
|
if $e < 1mb {
|
||||||
$color_palette.red
|
$color_palette.green
|
||||||
|
} else if $e < 100mb {
|
||||||
|
$color_palette.yellow
|
||||||
|
} else if $e < 500mb {
|
||||||
|
$color_palette.peach
|
||||||
|
} else if $e < 800mb {
|
||||||
|
$color_palette.maroon
|
||||||
|
} else if $e > 800mb {
|
||||||
|
$color_palette.red
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
date: {|| (date now) - $in |
|
||||||
|
if $in < 1hr {
|
||||||
|
$color_palette.green
|
||||||
|
} else if $in < 1day {
|
||||||
|
$color_palette.yellow
|
||||||
|
} else if $in < 3day {
|
||||||
|
$color_palette.peach
|
||||||
|
} else if $in < 1wk {
|
||||||
|
$color_palette.maroon
|
||||||
|
} else if $in > 1wk {
|
||||||
|
$color_palette.red
|
||||||
|
}
|
||||||
|
}
|
||||||
|
range: $color_palette.text
|
||||||
|
float: $color_palette.text
|
||||||
|
string: $color_palette.text
|
||||||
|
nothing: $color_palette.text
|
||||||
|
binary: $color_palette.text
|
||||||
|
cellpath: $color_palette.text
|
||||||
|
row_index: { fg: $color_palette.mauve attr: "b" }
|
||||||
|
record: $color_palette.text
|
||||||
|
list: $color_palette.text
|
||||||
|
block: $color_palette.text
|
||||||
|
hints: $color_palette.overlay1
|
||||||
|
search_result: { fg: $color_palette.red bg: $color_palette.text }
|
||||||
|
|
||||||
|
shape_and: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_binary: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_block: { fg: $color_palette.blue attr: "b" }
|
||||||
|
shape_bool: $color_palette.teal
|
||||||
|
shape_custom: $color_palette.green
|
||||||
|
shape_datetime: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_directory: $color_palette.teal
|
||||||
|
shape_external: $color_palette.teal
|
||||||
|
shape_externalarg: { fg: $color_palette.green attr: "b" }
|
||||||
|
shape_filepath: $color_palette.teal
|
||||||
|
shape_flag: { fg: $color_palette.blue attr: "b" }
|
||||||
|
shape_float: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_garbage: { fg: $color_palette.text bg: $color_palette.red attr: "b" }
|
||||||
|
shape_globpattern: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_int: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_internalcall: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_list: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_literal: $color_palette.blue
|
||||||
|
shape_match_pattern: $color_palette.green
|
||||||
|
shape_matching_brackets: { attr: "u" }
|
||||||
|
shape_nothing: $color_palette.teal
|
||||||
|
shape_operator: $color_palette.peach
|
||||||
|
shape_or: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_pipe: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_range: { fg: $color_palette.peach attr: "b" }
|
||||||
|
shape_record: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_redirection: { fg: $color_palette.pink attr: "b" }
|
||||||
|
shape_signature: { fg: $color_palette.green attr: "b" }
|
||||||
|
shape_string: $color_palette.green
|
||||||
|
shape_string_interpolation: { fg: $color_palette.teal attr: "b" }
|
||||||
|
shape_table: { fg: $color_palette.blue attr: "b" }
|
||||||
|
shape_variable: $color_palette.pink
|
||||||
|
|
||||||
|
background: $color_palette.base
|
||||||
|
foreground: $color_palette.text
|
||||||
|
cursor: $color_palette.blue
|
||||||
}
|
}
|
||||||
range: $color_palette.text
|
}
|
||||||
float: $color_palette.text
|
|
||||||
string: $color_palette.text
|
|
||||||
nothing: $color_palette.text
|
|
||||||
binary: $color_palette.text
|
|
||||||
cellpath: $color_palette.text
|
|
||||||
row_index: { fg: $color_palette.mauve attr: "b" }
|
|
||||||
record: $color_palette.text
|
|
||||||
list: $color_palette.text
|
|
||||||
block: $color_palette.text
|
|
||||||
hints: $color_palette.overlay1
|
|
||||||
search_result: { fg: $color_palette.red bg: $color_palette.text }
|
|
||||||
|
|
||||||
shape_and: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_binary: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_block: { fg: $color_palette.blue attr: "b" }
|
|
||||||
shape_bool: $color_palette.teal
|
|
||||||
shape_custom: $color_palette.green
|
|
||||||
shape_datetime: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_directory: $color_palette.teal
|
|
||||||
shape_external: $color_palette.teal
|
|
||||||
shape_externalarg: { fg: $color_palette.green attr: "b" }
|
|
||||||
shape_filepath: $color_palette.teal
|
|
||||||
shape_flag: { fg: $color_palette.blue attr: "b" }
|
|
||||||
shape_float: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_garbage: { fg: $color_palette.text bg: $color_palette.red attr: "b" }
|
|
||||||
shape_globpattern: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_int: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_internalcall: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_list: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_literal: $color_palette.blue
|
|
||||||
shape_match_pattern: $color_palette.green
|
|
||||||
shape_matching_brackets: { attr: "u" }
|
|
||||||
shape_nothing: $color_palette.teal
|
|
||||||
shape_operator: $color_palette.peach
|
|
||||||
shape_or: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_pipe: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_range: { fg: $color_palette.peach attr: "b" }
|
|
||||||
shape_record: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_redirection: { fg: $color_palette.pink attr: "b" }
|
|
||||||
shape_signature: { fg: $color_palette.green attr: "b" }
|
|
||||||
shape_string: $color_palette.green
|
|
||||||
shape_string_interpolation: { fg: $color_palette.teal attr: "b" }
|
|
||||||
shape_table: { fg: $color_palette.blue attr: "b" }
|
|
||||||
shape_variable: $color_palette.pink
|
|
||||||
|
|
||||||
background: $color_palette.base
|
|
||||||
foreground: $color_palette.text
|
|
||||||
cursor: $color_palette.blue
|
|
||||||
}}
|
|
||||||
|
|
||||||
# Update the Nushell configuration
|
# Update the Nushell configuration
|
||||||
export def --env "set color_config" [] {
|
export def --env "set color_config" [] {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue