mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-02-18 22:03:26 +00:00
Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
This commit is contained in:
37
dot_config/nushell/nu_scripts/benchmarks/gradient.nu
Normal file
37
dot_config/nushell/nu_scripts/benchmarks/gradient.nu
Normal file
@@ -0,0 +1,37 @@
|
||||
# height = 40
|
||||
# width = 160
|
||||
# stamp = "py"
|
||||
|
||||
# for line in range(0, height):
|
||||
# row_data = ""
|
||||
|
||||
# for col in range(0, width):
|
||||
# fgcolor = 2 + 2 * col
|
||||
# if fgcolor > 200 and fgcolor < 210:
|
||||
# row_data = row_data + color(stamp, bg='rgb(0, 0, %d)' % fgcolor)
|
||||
# else:
|
||||
# fg = fgcolor % 256
|
||||
# row_data = row_data + color(' ', bg='rgb(0, 0, %d)' % fg)
|
||||
|
||||
# print(row_data)
|
||||
|
||||
const height = 40
|
||||
const width = 160
|
||||
const stamp = "Nu"
|
||||
|
||||
for line in 0..$height {
|
||||
mut row_data = ""
|
||||
|
||||
for col in 0..$width {
|
||||
let fgcolor = 2 + 2 * $col
|
||||
|
||||
if $fgcolor > 200 and $fgcolor < 210 {
|
||||
$row_data += $"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
|
||||
} else {
|
||||
let fg = $fgcolor mod 256
|
||||
$row_data += $"(ansi -e '48;2;0;0;')($fg)m (ansi -e '0m')"
|
||||
}
|
||||
}
|
||||
|
||||
print $row_data
|
||||
}
|
||||
Reference in New Issue
Block a user