Add Color to hostidenticator

This commit is contained in:
TKE
2022-11-14 15:22:00 +01:00
parent c25555f367
commit f61af3c942

View File

@@ -63,11 +63,11 @@ bash_prompt() {
HOST_ICO=" "
hosthash=$(hostname | md5sum | cut -c1)
[[ $hosthash == "a" ]] && HOST_ICO=""
[[ $hosthash == "9" ]] && HOST_ICO=""
[[ $hosthash == "5" ]] && HOST_ICO=""
[[ $hosthash == "a" ]] && HOST_ICO="${EMM}"
[[ $hosthash == "9" ]] && HOST_ICO="${EMG}"
[[ $hosthash == "5" ]] && HOST_ICO="${EMB}"
PS1="${TITLEBAR}${BAR_ON}\${NEW_BAR}${BAR_OFF}\r\n\t\${HOST_ICO}${EMY}\${NEW_PWD}${EMK}]${UC}\n\\$ ${NONE}"
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}]\\$ "