Files
dotfiles/tty/bash.bashrc

64 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ $DISPLAY ]] && shopt -s checkwinsize
PS1='[\u@\h \W]\$ '
case ${TERM} in
Eterm*|alacritty*|aterm*|foot*|gnome*|konsole*|kterm*|putty*|rxvt*|tmux*|xterm*)
PROMPT_COMMAND+=('printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"')
;;
screen*)
PROMPT_COMMAND+=('printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"')
;;
esac
if [[ -r /usr/share/bash-completion/bash_completion ]]; then
. /usr/share/bash-completion/bash_completion
fi
#if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
# 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 ($) lorsquau moins une zone de stash existe
export GIT_PS1_SHOWSTASHSTATE=1
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
# You may comment the following lines if you won't `ls' to be colorized:
eval "$(dircolors)"
umask=002
while read -r line
do
alias "$line"
done < /etc/bash.bashaliases
source "/etc/bash.bashexport"
PATH=/games:/usr/local/sbin:/usr/local/bin:/usr/bin
# History config
HISTSIZE=1000
HISTTIMEFORMAT="%F %T "
neofetch