]> git.wh0rd.org - home.git/blame - .bin/bash-colors
add yuicompressor helper
[home.git] / .bin / bash-colors
CommitLineData
8069c098 1#!/bin/bash
ea2a7d52
MF
2
3if [[ $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'"
583623f9 9 BRACKET="\$'\e[34;01m'"
ea2a7d52
MF
10 NORMAL="\$'\e[0m'"
11 )
12 for c in "${colors[@]}" ; do
b73f07c7 13 [[ -t 0 ]] || c="${c%=*}="
ea2a7d52
MF
14 echo "${c}"
15 done
16
17 exit 0
18fi
19
ee33e474
MF
20showit() {
21 echo -e '\e['"${1};${2}mthis color is: \\\\e[${1};${2}m \e[0m"
22}
23case $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
8069c098 29 done
ee33e474
MF
30 ;;
31cube|6x6x6)
32 for n in {16..231} ; do
33 showit "38;05" $(printf '%03i' ${n})
34 done
35 ;;
36gr[ae]y)
37 for n in {232..255} ; do
38 showit "38;05" ${n}
39 done
40 ;;
41all|256)
42 for x in system cube gray ; do
43 echo "### SET: ${x}"
44 "$0" ${x}
45 done
46 ;;
47esac