Set the custom bin path within a dedicated script
The custom bin path was set in multiple places. Each time, the line was identical and supposed the use of a /bin/sh emulation with a common extension. To reduce duplicated code and support other platforms, the custom bin path is now set in a dedicated script that can be source'd.
This commit is contained in:
parent
e24502769b
commit
01472b6d05
5 changed files with 12 additions and 5 deletions
4
.bashrc
4
.bashrc
|
@ -14,7 +14,9 @@ export PAGER='less'
|
||||||
export USER_NICKNAME="Rodolphe Breard"
|
export USER_NICKNAME="Rodolphe Breard"
|
||||||
export DEBEMAIL="packages+deb@what.tf"
|
export DEBEMAIL="packages+deb@what.tf"
|
||||||
export DEBFULLNAME="$USER_NICKNAME"
|
export DEBFULLNAME="$USER_NICKNAME"
|
||||||
[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH"
|
|
||||||
|
# Path
|
||||||
|
[ -f ~/.setpath.sh ] && . ~/.setpath.sh
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
[ "$CLICOLOR" -ne 0 ] && hash dircolors 2>/dev/null && eval $(dircolors -b)
|
[ "$CLICOLOR" -ne 0 ] && hash dircolors 2>/dev/null && eval $(dircolors -b)
|
||||||
|
|
4
.setpath.sh
Normal file
4
.setpath.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
BIN_PATH="$HOME/bin"
|
||||||
|
found=$(echo $PATH | tr ':' '\n' | grep -w "$BIN_PATH")
|
||||||
|
[ ! "$found" ] && export PATH="$BIN_PATH:$PATH"
|
||||||
|
true
|
2
.xinitrc
2
.xinitrc
|
@ -1,7 +1,7 @@
|
||||||
[ -f ~/.xprofile ] && . ~/.xprofile
|
[ -f ~/.xprofile ] && . ~/.xprofile
|
||||||
|
[ -f ~/.setpath.sh ] && . ~/.setpath.sh
|
||||||
|
|
||||||
DEFAULT_SESSION=qtile
|
DEFAULT_SESSION=qtile
|
||||||
[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH"
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
awesome)
|
awesome)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
[ -f /etc/xprofile ] && . /etc/xprofile
|
[ -f /etc/xprofile ] && . /etc/xprofile
|
||||||
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
|
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
|
||||||
|
[ -f ~/.setpath.sh ] && . ~/.setpath.sh
|
||||||
|
|
||||||
setxkbmap -option compose:menu
|
setxkbmap -option compose:menu
|
||||||
setxkbmap -option compose:rwin
|
setxkbmap -option compose:rwin
|
||||||
|
@ -7,5 +8,3 @@ setxkbmap -option compose:rwin
|
||||||
hash xcompmgr 2>/dev/null && xcompmgr &
|
hash xcompmgr 2>/dev/null && xcompmgr &
|
||||||
hash xscreensaver 2>/dev/null && xscreensaver -no-splash &
|
hash xscreensaver 2>/dev/null && xscreensaver -no-splash &
|
||||||
hash gpg-agent 2>/dev/null && eval $(gpg-agent --daemon --enable-ssh-support)
|
hash gpg-agent 2>/dev/null && eval $(gpg-agent --daemon --enable-ssh-support)
|
||||||
|
|
||||||
[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH"
|
|
||||||
|
|
4
.zshrc
4
.zshrc
|
@ -11,7 +11,9 @@ export PAGER='less'
|
||||||
export USER_NICKNAME="Rodolphe Breard"
|
export USER_NICKNAME="Rodolphe Breard"
|
||||||
export DEBEMAIL="packages+deb@what.tf"
|
export DEBEMAIL="packages+deb@what.tf"
|
||||||
export DEBFULLNAME="$USER_NICKNAME"
|
export DEBFULLNAME="$USER_NICKNAME"
|
||||||
[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH"
|
|
||||||
|
# Path
|
||||||
|
[ -f ~/.setpath.sh ] && . ~/.setpath.sh
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
[ "$CLICOLOR" -ne 0 ] && hash dircolors 2>/dev/null && eval $(dircolors -b)
|
[ "$CLICOLOR" -ne 0 ] && hash dircolors 2>/dev/null && eval $(dircolors -b)
|
||||||
|
|
Loading…
Reference in a new issue