improve PS1

This commit is contained in:
SALVI Jérémie
2024-08-16 06:49:42 +02:00
parent 32fc1014ee
commit 0362c86981
3 changed files with 20 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
[Desktop Entry] [Desktop Entry]
Name=Teams - Client for linux Name=Teams
Comment=Microsoft Call, Chat, o365 interface... 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 Exec=flatpak run com.github.IsmaelMartinez.teams_for_linux --no-sandbox 2&>1 > /dev/null
Icon=teams Icon=teams
Type=Application Type=Application

View File

@@ -27,22 +27,21 @@ fi
# exec Hyprland --i-am-really-stupid # exec Hyprland --i-am-really-stupid
#fi #fi
. /usr/share/git/git-prompt.sh _git () {
# afficher le status de la branche locale (<, >, =) if git branch > /dev/null 2>&1
export GIT_PS1_SHOWUPSTREAM=1 then
# affiche (*) en cas de modifications en zone de travail ou de cache printf "\e[48;5;069;38;5;063m\e[00m\e[48;5;069m"
export GIT_PS1_SHOWDIRTYSTATE=1 printf "  %s " "$(awk '{print $2}' <<< "$(git branch)")"
# affiche (%) en cas de nouveaux fichiers printf "\e[00m\e[38;5;069m\e[00m"
export GIT_PS1_SHOWUNTRACKEDFILES=1 else
# affiche ($) lorsquau moins une zone de stash existe printf "\e[38;5;063m\e[00m"
export GIT_PS1_SHOWSTASHSTATE=1 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)" PS1="\n\[\e[48;5;027m\] \u \[\e[00m\]\[\e[48;5;033;38;5;027m\]\[\e[00m\]"
if [ "$(id -u)" != 0 ]; then PS1+="\[\e[48;5;033m\] \h \[\e[00m\]\[\e[48;5;063;38;5;033m\]\e[00m\]"
PS1=$PS1" \$ " PS1+="\[\e[48;5;063m\] \w \[\e[00m\]"
else PS1+="\$(_git) "
PS1=$PS1" # "
fi
# You may comment the following lines if you won't `ls' to be colorized: # You may comment the following lines if you won't `ls' to be colorized:
eval "$(dircolors)" eval "$(dircolors)"

View File

@@ -5,6 +5,7 @@ curl
discord discord
dmenu dmenu
dunst dunst
egl-wayland
feh feh
flameshot flameshot
flatpak flatpak
@@ -15,6 +16,8 @@ i3lock
i3-wm i3-wm
lxappearance lxappearance
nextcloud-client nextcloud-client
nvidia
nvidia-utils
nwg-look nwg-look
otf-comicshanns-nerd otf-comicshanns-nerd
pavucontrol pavucontrol