2016-09-04 13:58:13 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# Sets the PS1
|
|
|
|
|
|
|
|
_tbold="\[$(tput bold)\]"
|
|
|
|
_treset="\[$(tput sgr0)\]"
|
|
|
|
_tred="\[$(tput setaf 1)\]"
|
|
|
|
_tblue="\[$(tput setaf 4)\]"
|
|
|
|
_tmag="\[$(tput setaf 5)\]"
|
|
|
|
|
2017-05-21 14:49:24 +02:00
|
|
|
host_color_code=$(echo "$(whoami)|$(hostname)" | md5sum | cut -f1 -d' ' \
|
|
|
|
| tr -d '\n' | tail -c2)
|
|
|
|
host_color="\[$(tput setaf 0x${host_color_code})\]"
|
|
|
|
|
|
|
|
export PS1="${_tbold}[${host_color}◉${_tred}\u@\h ${_tblue}\W${_treset}${_tbold}]\\$ ${_treset}"
|
2016-09-04 13:58:13 +02:00
|
|
|
|
|
|
|
unset _t{bold,reset,red,blue,mag}
|