summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-01-02 16:30:59 -0500
committerdoy <doy@tozt.net>2009-01-02 16:30:59 -0500
commit9dc98ac74aa7af253e30ce1f354c058d9047109f (patch)
treed2054b84cbb10805239d4f384e30f90729292e38
parent97947ac75ee9db0904ba0dde00366a5924a6d6a2 (diff)
downloadconf-9dc98ac74aa7af253e30ce1f354c058d9047109f.tar.gz
conf-9dc98ac74aa7af253e30ce1f354c058d9047109f.zip
factor out term colors to variables
-rw-r--r--bash/colors18
-rw-r--r--bashrc3
2 files changed, 20 insertions, 1 deletions
diff --git a/bash/colors b/bash/colors
new file mode 100644
index 0000000..bad7238
--- /dev/null
+++ b/bash/colors
@@ -0,0 +1,18 @@
+GRAY="\033[0;30m"
+BLACK="\033[1;30m"
+RED="\033[0;31m"
+HIRED="\033[1;31m"
+GREEN="\033[0;32m"
+HIGREEN="\033[1;32m"
+YELLOW="\033[0;33m"
+HIYELLOW="\033[1;33m"
+BLUE="\033[0;34m"
+HIBLUE="\033[1;34m"
+MAGENTA="\033[0;35m"
+HIMAGENTA="\033[1;35m"
+CYAN="\033[0;36m"
+HICYAN="\033[1;36m"
+WHITE="\033[0;37m"
+HIWHITE="\033[1;37m"
+BOLD="\033[0;39m"
+NORM="\033[0m"
diff --git a/bashrc b/bashrc
index dadc1b8..de78daa 100644
--- a/bashrc
+++ b/bashrc
@@ -105,6 +105,7 @@ function alert {
# }}}
# }}}
# bash configuration {{{
+source ~/.bash/colors
shopt -s extglob
shopt -s no_empty_cmd_completion
shopt -s checkwinsize
@@ -112,7 +113,7 @@ shopt -s histappend
set -o vi
export HISTCONTROL=ignoredups
export PATH="~/.bin/marathon:~/.bin/nethack:~/.bin:${PATH}:/usr/local/sbin:/usr/local/bin"
-export PS1='$(_tmp=$(printf %03d $?); echo "${_tmp/*[1-9]*/\[\033[1;31;40m\]$_tmp\[\033[m\]}" "\[\033[01;33m\][\t] \[\033[01;32m\]\u@\h\[\033[01;34m\] \W $\[\033[00m\] ")'
+export PS1='$(_tmp=$(printf %03d $?); echo "${_tmp/*[1-9]*/\['${HIRED}'\]$_tmp}" "\['${HIYELLOW}'\][\t] \['${HIGREEN}'\]\u@\h\['${HIBLUE}'\] \W $\['${NORM}'\] ")'
if [[ -z "$PROMPT_COMMAND" ]]; then
export PROMPT_COMMAND='history -a'
else