]> git.wh0rd.org - home.git/blob - .bin/bash-colors
goobuntu: install more dev pkgs
[home.git] / .bin / bash-colors
1 #!/bin/bash
2
3 if [[ $1 == "--env" ]] ; then
4 colors=(
5 GOOD="\$'\e[32;01m'"
6 WARN="\$'\e[33;01m'"
7 BAD="\$'\e[31;01m'"
8 HILITE="\$'\e[36;01m'"
9 BRACKET="\$'\e[34;01m'"
10 NORMAL="\$'\e[0m'"
11 )
12 for c in "${colors[@]}" ; do
13 [[ -t 0 ]] || c="${c%=*}="
14 echo "${c}"
15 done
16
17 exit 0
18 fi
19
20 showit() {
21 echo -e '\e['"${1};${2}mthis color is: \\\\e[${1};${2}m \e[0m"
22 }
23 case $1 in
24 ""|16|system)
25 for i in {0..1} ; do
26 for j in {30..37} ; do
27 showit ${i} ${j}
28 done
29 done
30 ;;
31 cube|6x6x6)
32 for n in {16..231} ; do
33 showit "38;05" $(printf '%03i' ${n})
34 done
35 ;;
36 gr[ae]y)
37 for n in {232..255} ; do
38 showit "38;05" ${n}
39 done
40 ;;
41 all|256)
42 for x in system cube gray ; do
43 echo "### SET: ${x}"
44 "$0" ${x}
45 done
46 ;;
47 esac