aboutsummaryrefslogtreecommitdiff
path: root/fun/bin/colors
diff options
context:
space:
mode:
authorxero <x@xero.nu>2015-11-01 15:40:55 -0500
committerxero <x@xero.nu>2015-11-01 15:40:55 -0500
commitd83a172950d90861d63b3891b14d5106e710502d (patch)
tree1da5c1e7ed2324e37508f5e817d5d768d8d486b8 /fun/bin/colors
parentc9794fec6f9c9bb5ffbf0666d81bc167cc3273e3 (diff)
downloaddotfiles_ascii-d83a172950d90861d63b3891b14d5106e710502d.tar.xz
dotfiles_ascii-d83a172950d90861d63b3891b14d5106e710502d.zip
use ~/bin like a civilized nixer
Diffstat (limited to 'fun/bin/colors')
-rwxr-xr-xfun/bin/colors13
1 files changed, 13 insertions, 0 deletions
diff --git a/fun/bin/colors b/fun/bin/colors
new file mode 100755
index 0000000..c8d527b
--- /dev/null
+++ b/fun/bin/colors
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+xdef="$HOME/.Xdefaults"
+
+colors=( $( sed -re '/^!/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}; do echo -en "\e[$((30+$i))m ${colors[i]} \e[0m"; done
+echo
+for i in {8..15}; do echo -en "\e[1;$((22+$i))m ${colors[i]} \e[0m"; done
+echo -e "\n"