Add time and colors to PS1.
This commit is contained in:
@@ -145,7 +145,41 @@
|
||||
fi
|
||||
curl "https://wttr.in/${1//\ /+}"
|
||||
}
|
||||
export_PS1: export PS1='[\u@\h \w]\$ '
|
||||
export_PS1: |
|
||||
# Old Trusty
|
||||
#export PS1='[\u@\h \w]\$ '
|
||||
|
||||
# 20251201 - Add time.
|
||||
#export PS1='[\t \u@\h \w]\$ '
|
||||
|
||||
# 20251201 - Add colors.
|
||||
PURPLE=`tput setaf 5`
|
||||
ORANGE=`tput setaf 214`
|
||||
GREEN=`tput setaf 2`
|
||||
|
||||
RESET=`tput sgr0`
|
||||
BOLD=`tput bold`
|
||||
|
||||
RED=`tput setaf 9`
|
||||
SCARLET=`tput setaf 1`
|
||||
YELLOW=`tput setaf 226` # 11 does not seem to work
|
||||
GRAY=`tput setaf 8`
|
||||
|
||||
if [[ "$USER" == "root" || $UID == 0 ]]; then
|
||||
CLR_BRACKETS=$BOLD$YELLOW
|
||||
CLR_TIME=$BOLD$ORANGE
|
||||
CLR_USER=$BOLD$SCARLET
|
||||
CLR_DIR=$BOLD$RED
|
||||
CLR_PROMPT=$BOLD$GRAY
|
||||
else
|
||||
CLR_BRACKETS=$RESET
|
||||
CLR_TIME=$BOLD$PURPLE
|
||||
CLR_USER=$BOLD$ORANGE
|
||||
CLR_DIR=$BOLD$GREEN
|
||||
CLR_PROMPT=$RESET
|
||||
fi
|
||||
export PS1='\[$CLR_BRACKETS\][\[$CLR_TIME\]\t \[$CLR_USER\]\u@\h \[$CLR_DIR\]\w\[$CLR_BRACKETS\]]\[$CLR_PROMPT\]\$ \[$RESET\]'
|
||||
export PS2='(>^.^)> '
|
||||
alias_remount: |
|
||||
alias remount='
|
||||
sudo umount /mnt/*
|
||||
|
||||
Reference in New Issue
Block a user