From 0362c869814e264c987607d0d1e551b8acba0927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SALVI=20J=C3=A9r=C3=A9mie?= Date: Fri, 16 Aug 2024 06:49:42 +0200 Subject: [PATCH] improve PS1 --- links/applications/teams.desktop | 4 ++-- links/tty/bash.bashrc | 31 +++++++++++++++---------------- packages | 3 +++ 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/links/applications/teams.desktop b/links/applications/teams.desktop index fe69b87..2120232 100644 --- a/links/applications/teams.desktop +++ b/links/applications/teams.desktop @@ -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 diff --git a/links/tty/bash.bashrc b/links/tty/bash.bashrc index e60dc11..52a6759 100644 --- a/links/tty/bash.bashrc +++ b/links/tty/bash.bashrc @@ -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 \ No newline at end of file +neofetch diff --git a/packages b/packages index 9c91233..f204459 100644 --- a/packages +++ b/packages @@ -5,6 +5,7 @@ curl discord dmenu dunst +egl-wayland feh flameshot flatpak @@ -15,6 +16,8 @@ i3lock i3-wm lxappearance nextcloud-client +nvidia +nvidia-utils nwg-look otf-comicshanns-nerd pavucontrol