U:prompt.sh dynamic
This commit is contained in:
parent
f287212ca8
commit
d4cdc78937
1 changed files with 6 additions and 19 deletions
|
@ -1,10 +1,3 @@
|
|||
# PROMPT
|
||||
# FG orange 38;5;208m
|
||||
# FG noir + BG orange 48;5;208;38;5;16m
|
||||
# FG noir + BG jaune 48;5;214;38;5;16m
|
||||
# FG noir + BG bleu 48;5;39;38;5;16m
|
||||
# FG bleu 38;5;39m
|
||||
|
||||
# VARIABLES
|
||||
declare -r fg_orange='\001\e[38;5;208m\002'
|
||||
declare -r fg_bleu='\001\e[38;5;39m\002'
|
||||
|
@ -24,7 +17,11 @@ p_user() {
|
|||
}
|
||||
|
||||
p_path() {
|
||||
echo -e "${bg_jaune} \uEA83 \w"
|
||||
case $PWD in
|
||||
$HOME) echo -e "${bg_jaune} \uE617";;
|
||||
/) echo -e "${bg_jaune} \uF013";;
|
||||
*) echo -e "${bg_jaune} \uEA83";;
|
||||
esac
|
||||
}
|
||||
|
||||
p_date() {
|
||||
|
@ -40,14 +37,4 @@ p_input() {
|
|||
echo -e "${fg_orange}\u25B6${reset}"
|
||||
}
|
||||
|
||||
PS1="$(p_start)$(p_user) $(p_path) $(p_date)$(p_end)\n$(p_input) "
|
||||
|
||||
#PS1=$'\n\e[0m\e[38;5;208m\uE0B6\e[48;5;208;38;5;16m\u \
|
||||
#\e[48;5;214;38;5;16m \uEA83 \w \
|
||||
#\e[48;5;39;38;5;16m $(date +%H:%M:%S) [$?]\e[0m\e[38;5;39m\uE0B4\e[0m\n\
|
||||
#\e[38;5;208m\u25B6\e[0m '
|
||||
|
||||
#PS1="\n${reset}${fg_orange}\uE0B6${bg_orange}${fg_noir}\u \
|
||||
#${bg_jaune} \uEA83 \w \
|
||||
#${bg_bleu} $(date +%H:%M:%S) [$?]${reset}${fg_bleu}\uE0B4${reset}\n\
|
||||
#${fg_orange}\u25B6${reset}"
|
||||
PS1="$(p_start)$(p_user) \$(p_path) \w $(p_date)$(p_end)\n$(p_input) "
|
||||
|
|
Loading…
Reference in a new issue