From c748d76878e7e0740b6254d394cd2a096a0b2179 Mon Sep 17 00:00:00 2001 From: T0MuX Date: Tue, 28 Jan 2025 06:31:37 +0100 Subject: [PATCH] U:prompt.sh +icons :p --- bashrc.d/prompt.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/bashrc.d/prompt.sh b/bashrc.d/prompt.sh index 26540e4..3bbef85 100644 --- a/bashrc.d/prompt.sh +++ b/bashrc.d/prompt.sh @@ -20,10 +20,7 @@ p_start() { } p_user() { - if [ -z $TERMUX_VERSION ] - then - user=$(grep $USER /etc/passwd | cut -d: -f5) - fi + user=$(grep $USER /etc/passwd | cut -d: -f5) if [ -z $user ] then echo -e "${bg_orange}${fg_noir}\u" @@ -35,11 +32,11 @@ p_user() { p_path() { echo -ne "${bg_jaune} " case $PWD in - $HOME) echo -e "\uE617";; $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 @@ -52,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 } @@ -69,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)"