From f140a1642ebfde198946ad6760c1003c1cb9a8c3 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Sat, 11 Aug 2012 02:40:34 +0200 Subject: scripts --- bin/show_colors | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 bin/show_colors (limited to 'bin/show_colors') diff --git a/bin/show_colors b/bin/show_colors new file mode 100755 index 0000000..4e48ec1 --- /dev/null +++ b/bin/show_colors @@ -0,0 +1,53 @@ + + + + show_colors + + + + +
+ New | + Raw | + Plain | + Currently: show_colors | + Timeout: never +
+ Code | + Render Markdown +
+
+ + + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+
+
#!/bin/zsh
+ 
+xdef="$HOME/.colors/hund"
+ 
+colors=( $( sed -E '/^!/d; /^$/d; /^#/d; s/(\*color)([0-9]):/\10\2:/g;' $xdef | grep 'color[01][0-9]:' | sort | sed  's/^.*: *//g' ) )
+ 
+echo -e "\e[1;37m 
+ Black    Red      Green    Yellow   Blue     Magenta  Cyan     White   
+────────────────────────────────────────────────────────────────────────\e[0m"
+for i in {0..7}; echo -en "\e[$((30+$i))m $colors[i+1] \e[0m"
+echo
+for i in {8..15}; echo -en "\e[1;$((22+$i))m $colors[i+1] \e[0m"
+echo -e "\n"
+ 
+ + -- cgit v1.2.3-24-g4f1b