nix-config/.PKGBUILDs/tari-scripts/colorline
Donovan Glover a6687d45e0
PKGBUILDs: Add sources
Here are the source files I package with my PKGBUILDs. The tari-scripts
directory features some color scripts from around the web. tari-urxvt
contains patches for urxvt, tari-util houses launch.c, and tari-web is
where my mozilla.cfg is located.
2018-11-12 22:03:37 -05:00

25 lines
536 B
Bash
Executable File

#!/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