Created
June 27, 2017 21:10
-
-
Save jacoby/542f4a95562130915079887a4a53424e to your computer and use it in GitHub Desktop.
Fun with Bash, giving color-coordination by host, user and host name, current temperature, coffee intake, path and git branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DEFAULT | |
prompt='\033[1;38;5;242m' | |
revert='\033[00m' | |
# CARTER | |
if [ $HOST = 'carter-fe00' ]; then | |
prompt='\033[1;38;5;210m\033[1;48;5;88m' # pink on dark red background | |
fi | |
if [ $HOST = 'carter-fe01' ]; then | |
prompt='\033[1;38;5;211m\033[1;48;5;88m' # pink on dark red background | |
fi | |
if [ $HOST = 'carter-fe02' ]; then | |
prompt='\033[1;38;5;212m\033[1;48;5;88m' # pink on dark red background | |
fi | |
if [ $HOST = 'carter-fe03' ]; then | |
prompt='\033[1;38;5;213m\033[1;48;5;88m' # pink on dark red background | |
fi | |
# OUR VIRTUAL MACHINES | |
if [ $HOST = 'genomics-apps' ]; then | |
prompt='\033[1;38;5;207m' #purple | |
fi | |
if [ $HOST = 'genomics-db' ]; then | |
prompt='\033[1;38;5;208m' #orange | |
fi | |
if [ $HOST = 'genomics' ]; then | |
prompt='\033[1;38;5;81m' #blue | |
fi | |
if [ $HOST = 'genomics-test' ]; then | |
prompt='\033[1;38;5;141m' #lavender | |
fi | |
# RADON | |
if [ $HOST = 'radon-fe00' ]; then | |
#prompt='\033[1;38;5;204m\033[1;48;5;240m' # pink on grey background | |
prompt='\033[1;38;5;204m' # pink | |
fi | |
if [ $HOST = 'radon-fe01' ]; then | |
#prompt='\033[1;38;5;207m\033[1;48;5;240m' # pink on grey background | |
prompt='\033[1;38;5;207m' # pink | |
fi | |
# SNYDER | |
if [ $HOST = 'snyder-fe00' ]; then | |
prompt='\033[1;38;5;214m' #orange | |
fi | |
if [ $HOST = 'snyder-fe01' ]; then | |
prompt='\033[1;38;5;216m' #orange | |
fi | |
# export PS1="\u@\h \A \w\n\\n\$ " | |
PS1="\ | |
\[\033]0;\u@\h: \w\007\]\ | |
\[${prompt}\]\u@\h\[${revert}\] \ | |
\A \ | |
\[${prompt}\]\$(~/bin/get_temp.pl)\[${revert}\] \ | |
\$(~/bin/get_coffee.pl) \ | |
\[${prompt}\]\w\$(__git_ps1)\[${revert}\] \ | |
\n\$ " | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment