2024-01-24 15:14:31 +01:00
|
|
|
########################################################################
|
|
|
|
# PROMPT
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
C1="\[$(tput setaf 241)\]" # gray
|
2024-01-28 11:17:14 +01:00
|
|
|
#C2="\[$(tput setaf 209)\]" # orange
|
2024-01-24 15:14:31 +01:00
|
|
|
C2="\[$(tput setaf 37)\]" # green
|
|
|
|
C0="\[$(tput op)\]" # reset
|
|
|
|
x=$(print \\001) # hack from ksh(1)
|
2024-02-14 07:54:31 +01:00
|
|
|
|
|
|
|
# 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"
|