mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-12 09:03:45 +00:00
feat: switch to biome, apply formatting, shellcheck (#227)
* feat: switch to biome, apply formatting, shellcheck * chore: apply cr comments * chore: few config tweaks, shellcheck hook now py-based * chore: lint fixes and pr comments * chore(lint): megalinter, and other fixes Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
This commit is contained in:
@@ -24,10 +24,10 @@ resetOutput()
|
||||
# ranging between 0 and 255 inclusive
|
||||
rainbowColor()
|
||||
{
|
||||
let h=$1/43
|
||||
let f=$1-43*$h
|
||||
let t=$f*255/43
|
||||
let q=255-t
|
||||
((h = $1 / 43))
|
||||
((f = $1 - 43 * h))
|
||||
((t = f * 255 / 43))
|
||||
((q = 255 - t))
|
||||
|
||||
if [ $h -eq 0 ]; then
|
||||
echo "255 $t 0"
|
||||
@@ -81,11 +81,13 @@ done
|
||||
resetOutput
|
||||
|
||||
for i in $(seq 0 127); do
|
||||
# shellcheck disable=SC2046 # Intentional word splitting to pass 3 RGB values as separate args
|
||||
setBackgroundColor $(rainbowColor "$i")
|
||||
echo -n " "
|
||||
done
|
||||
resetOutput
|
||||
for i in $(seq 255 128); do
|
||||
# shellcheck disable=SC2046 # Intentional word splitting to pass 3 RGB values as separate args
|
||||
setBackgroundColor $(rainbowColor "$i")
|
||||
echo -n " "
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user