Compare commits

...

2 commits

Author SHA1 Message Date
c748d76878 U:prompt.sh +icons :p 2025-01-28 06:31:37 +01:00
cc21cf6f2b U:prompt.sh +icons :p 2025-01-28 06:21:16 +01:00

View file

@ -20,10 +20,7 @@ p_start() {
}
p_user() {
if [ -z $TERMUX_VERSION ]
then
user=$(grep $USER /etc/passwd | cut -d: -f5)
fi
if [ -z $user ]
then
echo -e "${bg_orange}${fg_noir}\u"
@ -33,10 +30,15 @@ p_user() {
}
p_path() {
echo -ne "${bg_jaune} "
case $PWD in
$HOME) echo -e "${bg_jaune} \uE617";;
/) echo -e "${bg_jaune} \uF013";;
*) echo -e "${bg_jaune} \uEA83";;
$HOME/git*) echo -e "\uF418";;
$HOME/Sync*) echo -e "\uF021";;
$HOME/ZiK*|$HOME/Music*|$HOME/Musique*) echo -e "\uF001";;
$HOME/DL*|$HOME/Downloads*|$HOME/Téléchargements*) echo -e "\uF019";;
$HOME) echo -e "\uE617";;
/) echo -e "\uF013";;
*) echo -e "\uEA83";;
esac
}
@ -47,7 +49,7 @@ p_date() {
p_err() {
case $err in
0) echo -e "${bg_bleu}\uF00C${reset}";;
*) echo -e "${bg_bleu}${fg_jaune}\uF00D ${err}${reset}";;
*) echo -e "${bg_bleu}${fg_rouge}\uF00D ${err}${reset}";;
esac
}
@ -64,7 +66,5 @@ p_input() {
PROMPT_COMMAND="p_geterr"
echo debug
PS1="$(p_start)$(p_user) \$(p_path) \w \$(p_date) \$(p_err)\$(p_end)\n$(p_input) "
PS2="$(p_input)"