Add Hostindicator to prompt
This commit is contained in:
@@ -61,7 +61,13 @@ bash_prompt() {
|
||||
local UC=$W # user's color
|
||||
[ $UID -eq "0" ] && UC=$R # root's color
|
||||
|
||||
PS1="${TITLEBAR}${BAR_ON}\${NEW_BAR}${BAR_OFF}\r\n\t ${EMY}\${NEW_PWD}${EMK}]${UC}\n\\$ ${NONE}"
|
||||
HOST_ICO=" "
|
||||
hosthash=$(hostname | md5sum | cut -c1)
|
||||
[[ $hosthash == "a" ]] && HOST_ICO=" "
|
||||
[[ $hosthash == "9" ]] && HOST_ICO=" "
|
||||
[[ $hosthash == "5" ]] && HOST_ICO="⭘ "
|
||||
|
||||
PS1="${TITLEBAR}${BAR_ON}\${NEW_BAR}${BAR_OFF}\r\n\t\${HOST_ICO}${EMY}\${NEW_PWD}${EMK}]${UC}\n\\$ ${NONE}"
|
||||
#PS1="${TITLEBAR}${BAR_ON}$(printf '_%.0s' $(seq 1 $(tput cols)))${BAR_OFF}\r\n ${NEW_PWD} :\n\$ "
|
||||
#PS1='\[\033]0;\u - \w\007\]\[\033[44;37m\]'$(printf '_%.0s' $(seq 1 $(tput cols)))'\[\033[1;0m\]\r\n\t \w :\n\$ '
|
||||
# without colors: PS1="[\u@\h \${NEW_PWD}]\\$ "
|
||||
|
||||
Reference in New Issue
Block a user