aboutsummaryrefslogtreecommitdiff
path: root/code/fun/colors
diff options
context:
space:
mode:
authorxero <x@xero.nu>2014-03-08 22:05:02 -0500
committerxero <x@xero.nu>2014-03-08 22:05:02 -0500
commitb58ff155f74cbe76f51aa0074d8d2218de774613 (patch)
treec38b8ac4eab2ae476de312e80c8913db8b264334 /code/fun/colors
parent9ae724da88a69ab938ee1f899949441cb97b84a7 (diff)
downloaddotfiles_ascii-b58ff155f74cbe76f51aa0074d8d2218de774613.tar.xz
dotfiles_ascii-b58ff155f74cbe76f51aa0074d8d2218de774613.zip
reorganize scripts, and system automation scripts for hybrid graphics, touchpad management, and file comparison
Diffstat (limited to 'code/fun/colors')
-rwxr-xr-xcode/fun/colors13
1 files changed, 13 insertions, 0 deletions
diff --git a/code/fun/colors b/code/fun/colors
new file mode 100755
index 0000000..c8d527b
--- /dev/null
+++ b/code/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"