1
0
forked from extern/nix-config
donovanglover-nix-config/.archlinux/PKGBUILDs/tari-scripts/colorline
Donovan Glover c968246923
Move PKGBUILDs to .archlinux
Since fedpkg can access parent directories, having a top-level PKGBUILDs
directory is no longer necessary.
2018-11-13 12:22:24 -05:00

25 lines
536 B
Bash
Executable File
Vendored

#!/usr/bin/env bash
# set colors
colors=($(xrdb -query | sed -n 's/.*color\([0-9]\)/\1/p' | sort -nu | cut -f2))
f=3 b=4
for j in f b; do
for i in {0..7}; do
printf -v $j$i %b "\e[${!j}${i}m"
done
done
t=$'\e[0m'
# output
cat << EOF
$f1▀▀▀▀▀▀▀$t $f2▀▀▀▀▀▀▀$t $f3▀▀▀▀▀▀▀$t $f4▀▀▀▀▀▀▀$t $f5▀▀▀▀▀▀▀$t $f6▀▀▀▀▀▀▀$t $f7▀▀▀▀▀▀▀$t
EOF
for i in {1..7}; do echo -en "\e[$((30+$i))m${colors[i]} \e[0m "; done
echo
echo