Updated title bar.

This commit is contained in:
Nicole Tietz-Sokolskaya 2011-06-25 16:23:38 -04:00
parent 308887c9e8
commit 36de37c24f

26
profile
View file

@ -1,18 +1,26 @@
# PS1="\[\033]0;\@ [\u@\h] [\w]\007\]\[\033[1;33m\]\@ \[\033[1;37m\][\[\033[1;35m\]\u\[\033[1;37m\]@\[\033[1;32m\]\h\[\033[1;37m\]] \[\033[1;37m\][\[\033[1;31m\]\w\[\033[1;37m\]] [\[\033[1;36m\]$(ls -l | grep "^-" | wc -l | tr -d " ") \[\033[1;34m\]files\[\033[1;37m\]] \n\[\033[1;33m\]\@ \[\033[1;37m\]$ \[\033[0m\]" # PS1="\[\e]0;\@ [\u@\h] [\w]\007\]\[\e[1;33m\]\@ \[\e[1;37m\][\[\e[1;35m\]\u\[\e[1;37m\]@\[\e[1;32m\]\h\[\e[1;37m\]] \[\e[1;37m\][\[\e[1;31m\]\w\[\e[1;37m\]] [\[\e[1;36m\]$(ls -l | grep "^-" | wc -l | tr -d " ") \[\e[1;34m\]files\[\e[1;37m\]] \n\[\e[1;33m\]\@ \[\e[1;37m\]$ \[\e[0m\]"
function prompt { function prompt {
local BLUE="\[\033[0;34m\]" local BLUE="\[\e[0;34m\]"
local DARK_BLUE="\[\033[1;34m\]" local DARK_BLUE="\[\e[1;34m\]"
local RED="\[\033[0;31m\]" local RED="\[\e[0;31m\]"
local DARK_RED="\[\033[1;31m\]" local DARK_RED="\[\e[1;31m\]"
local GREEN="\[\033[0;32m\]" local GREEN="\[\e[0;32m\]"
local NO_COLOR="\[\033[0m\]" local NO_COLOR="\[\e[0m\]"
case $TERM in
xterm*|screen)
TITLEBAR='\[\e]0;\u@\h \w\007\]';
;;
*)
TITLEBAR="";
;;
esac
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
FAILURE_COLOR="if [[ \$? = '0' ]]; then echo \"$GREEN\"; else echo \"$RED\"; fi" FAILURE_COLOR="if [[ \$? = '0' ]]; then echo \"$GREEN\"; else echo \"$RED\"; fi"
PS1="$BLUE[\t] \`$FAILURE_COLOR\` \u@\h> $NO_COLOR" PS1="${TITLEBAR}$BLUE[\t] \`$FAILURE_COLOR\` \u@\h> $NO_COLOR"
} }
prompt prompt