22 lines
593 B
Bash
22 lines
593 B
Bash
########################################################################
|
|
# PROMPT
|
|
########################################################################
|
|
|
|
C1="\[$(tput setaf 241)\]" # gray
|
|
#C2="\[$(tput setaf 209)\]" # orange
|
|
C2="\[$(tput setaf 37)\]" # green
|
|
C0="\[$(tput op)\]" # reset
|
|
x=$(print \\001) # hack from ksh(1)
|
|
|
|
# accent
|
|
|
|
if [ $(id -u) -eq 0 ]
|
|
then
|
|
C2="\[$(tput setaf 160)\]" # red
|
|
else
|
|
#C2="\[$(tput setaf 209)\]" # orange
|
|
C2="\[$(tput setaf 37)\]" # green
|
|
fi
|
|
|
|
PS1="$x\${C1}[\${C2}\h\${C1}](\${C2}\${?}\${C1})(\${C2}\w\${C1})\\$ \${C0}$x"
|