diff --git a/bash/functions b/bash/functions index c382937..bc243e7 100644 --- a/bash/functions +++ b/bash/functions @@ -49,3 +49,16 @@ function get-bitrate { echo `exiftool -AudioBitrate "$1" | awk '{print $4}'`": $1" } +function _hostname-color { + case `whoami` in + 'bsandidge') echo $blue;; + 'buddy') echo $blue;; + 'root') echo $bred;; + *) echo $purple;; + esac +} + +function _hostname-show { + hostname -s | tr '[A-Z]' '[a-z]' +} + diff --git a/bash/prompt b/bash/prompt index 4a45e65..b44395c 100644 --- a/bash/prompt +++ b/bash/prompt @@ -1,7 +1,7 @@ #!/usr/bin/env bash # display hostname -PS1="\[$blue\]«\h»" +PS1="\[$(_hostname-color)\]«"'$(_hostname-show)'"»" # display separator PS1="$PS1\[$yellow\]⚡" # display current path