diff --git a/bash_ps1 b/bash_ps1 index 8476de9..cd58580 100644 --- a/bash_ps1 +++ b/bash_ps1 @@ -81,17 +81,21 @@ PathFull="\W" NewLine="\n" Jobs="\j" -__git_ps1 () -{ +__git_ps1 () +{ local b="$(git symbolic-ref HEAD 2>/dev/null)"; if [ -n "$b" ]; then printf " (%s)" "${b##refs/heads/}"; fi } +if [ $HOSTNAME = "intersect" ]; then + IntroCol=$BIBlack; +else + IntroCol=$BIRed; +fi - -export PS1=$BIBlack$Time12h$Color_Off'$(git branch &>/dev/null;\ +export PS1=$IntroCol$Time12h$Color_Off'$(git branch &>/dev/null;\ if [ $? -eq 0 ]; then \ echo "$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; \ if [ "$?" -eq "0" ]; then \ diff --git a/bashrc b/bashrc index 8e35299..b611919 100644 --- a/bashrc +++ b/bashrc @@ -54,11 +54,11 @@ esac #PS1="\[$RED\]\u\[$DFT$white\]@\[$magenta\]\h \[$DFT\]>>\[$CYAN\]\w \[$DFT\]" #PROMPT_COMMAND='history -a;echo -en "\033[m\033[38;5;2m"$(( `sed -nu "s/MemFree:[\t ]\+\([0-9]\+\) kB/\1/p" /proc/meminfo`/1024))"\033[38;5;22m/"$((`sed -nu "s/MemTotal:[\t ]\+\([0-9]\+\) kB/\1/Ip" /proc/meminfo`/1024 ))MB"\t\033[m\033[38;5;55m$(< /proc/loadavg)\033[m"' -if [ "$HOSTNAME" == "chuck" ]; then - MY_HOST_COL='[31m' #ugly ! -else - MY_HOST_COL='[34m' -fi +#if [ "$HOSTNAME" == "chuck" ]; then +# MY_HOST_COL='[31m' #ugly ! +#else +# MY_HOST_COL='[34m' +#fi #PS1='\[\e[0;36m\]\t \[\e[1;30m\][\[\e$MY_HOST_COL\]\u@\H\[\e[1;30m\]\[\e[0;32m\]\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n$ ' source ~/.bash_ps1