improve PS1
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Name=Teams - Client for linux
|
||||
Name=Teams
|
||||
Comment=Microsoft Call, Chat, o365 interface...
|
||||
GenericName=Teams
|
||||
GenericName=Teams - Client for linux
|
||||
Exec=flatpak run com.github.IsmaelMartinez.teams_for_linux --no-sandbox 2&>1 > /dev/null
|
||||
Icon=teams
|
||||
Type=Application
|
||||
|
||||
@@ -27,22 +27,21 @@ fi
|
||||
# exec Hyprland --i-am-really-stupid
|
||||
#fi
|
||||
|
||||
. /usr/share/git/git-prompt.sh
|
||||
# afficher le status de la branche locale (<, >, =)
|
||||
export GIT_PS1_SHOWUPSTREAM=1
|
||||
# affiche (*) en cas de modifications en zone de travail ou de cache
|
||||
export GIT_PS1_SHOWDIRTYSTATE=1
|
||||
# affiche (%) en cas de nouveaux fichiers
|
||||
export GIT_PS1_SHOWUNTRACKEDFILES=1
|
||||
# affiche ($) lorsqu’au moins une zone de stash existe
|
||||
export GIT_PS1_SHOWSTASHSTATE=1
|
||||
_git () {
|
||||
if git branch > /dev/null 2>&1
|
||||
then
|
||||
printf "\e[48;5;069;38;5;063m\e[00m\e[48;5;069m"
|
||||
printf " %s " "$(awk '{print $2}' <<< "$(git branch)")"
|
||||
printf "\e[00m\e[38;5;069m\e[00m"
|
||||
else
|
||||
printf "\e[38;5;063m\e[00m"
|
||||
fi
|
||||
}
|
||||
|
||||
export PS1="\[\e[1;34m\]\u\[\e[0;33m\]@\[\e[0;36m\]\h\[\e[0;33m\] \[\e[0;35m\]\w\[\e[0;00m\]\$(__git_ps1)"
|
||||
if [ "$(id -u)" != 0 ]; then
|
||||
PS1=$PS1" \$ "
|
||||
else
|
||||
PS1=$PS1" # "
|
||||
fi
|
||||
PS1="\n\[\e[48;5;027m\] \u \[\e[00m\]\[\e[48;5;033;38;5;027m\]\[\e[00m\]"
|
||||
PS1+="\[\e[48;5;033m\] \h \[\e[00m\]\[\e[48;5;063;38;5;033m\]\e[00m\]"
|
||||
PS1+="\[\e[48;5;063m\] \w \[\e[00m\]"
|
||||
PS1+="\$(_git) "
|
||||
|
||||
# You may comment the following lines if you won't `ls' to be colorized:
|
||||
eval "$(dircolors)"
|
||||
@@ -61,4 +60,4 @@ PATH=/games:/usr/local/sbin:/usr/local/bin:/usr/bin
|
||||
HISTSIZE=1000
|
||||
HISTTIMEFORMAT="%F %T "
|
||||
|
||||
neofetch
|
||||
neofetch
|
||||
|
||||
Reference in New Issue
Block a user