1
0
Fork 0
forked from ahurac/dotfiles

Remaniement : configuration system-wide de bash

This commit is contained in:
Hippolyte Chauvin 2023-10-13 09:24:44 +02:00
parent 64dd218a47
commit 8d38397249
8 changed files with 24 additions and 39 deletions

View file

@ -0,0 +1,3 @@
ps1_brackets='()'
ps1_color_1=32
ps1_color_2=34

View file

@ -0,0 +1,3 @@
ps1_brackets='[]'
ps1_color_1=35
ps1_color_2=34

View file

@ -0,0 +1,4 @@
ps1_color_1=36
ps1_color_2=34
export SYSTEMD_PAGER=

View file

@ -0,0 +1,14 @@
if [ "$(id -u)" -eq 0 ]; then
ps1_color_1=31
ps1_color_2=32
fi
PS1="\033[0m${ps1_brackets:0:1}\033[1;${ps1_color_1}m\u@\h\033[0m \033[1;${ps1_color_2}m\W\033[0m${ps1_brackets:1:1}\$ "
shrc_d=/usr/local/etc/sh/shrc.d
if [ -d "$shrc_d" ]; then
for i in "${shrc_d}/"*; do
. "$i"
done
fi

View file

@ -1,10 +0,0 @@
# PS1
if [ "$(id -u)" -eq 0 ]; then
ps1_color_1=1
ps1_color_2=10
else
ps1_color_1=2
ps1_color_2=4
fi
export PS1="(\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\])\\$ \[$(tput sgr0)\]"

View file

@ -1,10 +0,0 @@
# PS1
if [ "$(id -u)" -eq 0 ]; then
ps1_color_1=1
ps1_color_2=10
else
ps1_color_1=5
ps1_color_2=4
fi
export PS1="[\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\]]\\$ \[$(tput sgr0)\]"

View file

@ -1,7 +0,0 @@
shrc_d=/usr/local/etc/sh/shrc.d
if [ -d "$shrc_d" ]; then
for i in "${shrc_d}/"*; do
. "$i"
done
fi

View file

@ -1,12 +0,0 @@
# PS1
if [ "$(id -u)" -eq 0 ]; then
ps1_color_1=1
ps1_color_2=10
else
ps1_color_1=6
ps1_color_2=4
fi
export PS1="{\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\]}\\$ \[$(tput sgr0)\]"
export SYSTEMD_PAGER=