Add support for changing hostname color

main
Buddy Sandidge 12 years ago
parent 6d5ca731ed
commit 1002a482d3

@ -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]'
}

@ -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

Loading…
Cancel
Save