tide/tools/swatch.fish

15 lines
312 B
Fish
Raw Permalink Normal View History

2021-12-08 09:09:49 +03:00
#!/usr/bin/env fish
2021-12-08 09:01:39 +03:00
set -l height_in_lines 2
set -l width_in_chars (math --scale=0 $height_in_lines x 2.5) # 2.5 = ratio
2021-12-12 23:27:53 +03:00
for i in (seq $height_in_lines)
for arg in $argv
2021-12-08 09:01:39 +03:00
set_color -b $arg
string repeat --no-newline --count $width_in_chars ' '
set_color normal
end
2021-12-12 23:27:53 +03:00
echo
2021-12-08 09:01:39 +03:00
end