From 7e892df9b0e32673d5a635aca1ebfb079473a3f2 Mon Sep 17 00:00:00 2001 From: xero Date: Sat, 25 Jan 2014 20:30:17 -0500 Subject: add fun color scripts mostly from http://crunchbang.org/forums/viewtopic.php?id=13645 --- fun/colors | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 fun/colors (limited to 'fun/colors') diff --git a/fun/colors b/fun/colors new file mode 100755 index 0000000..c8d527b --- /dev/null +++ b/fun/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" -- cgit v1.2.1