diff options
Diffstat (limited to 'sh')
-rw-r--r-- | sh/.config/env/00-xdg.sh | 3 | ||||
-rw-r--r-- | sh/.config/env/10-path.sh | 4 | ||||
-rw-r--r-- | sh/.config/sh/environment.sh | 20 | ||||
-rw-r--r-- | sh/.profile | 8 |
4 files changed, 13 insertions, 22 deletions
diff --git a/sh/.config/env/00-xdg.sh b/sh/.config/env/00-xdg.sh new file mode 100644 index 0000000..51404c7 --- /dev/null +++ b/sh/.config/env/00-xdg.sh @@ -0,0 +1,3 @@ +export XDG_CONFIG_HOME="${HOME}/.config" +export XDG_CACHE_HOME="${HOME}/.cache" +export XDG_DATA_HOME="${HOME}/.local/share" diff --git a/sh/.config/env/10-path.sh b/sh/.config/env/10-path.sh new file mode 100644 index 0000000..67cb738 --- /dev/null +++ b/sh/.config/env/10-path.sh @@ -0,0 +1,4 @@ +if [ -d "${HOME}/bin" ] +then + export PATH="${PATH}:${HOME}/bin" +fi diff --git a/sh/.config/sh/environment.sh b/sh/.config/sh/environment.sh deleted file mode 100644 index f02296d..0000000 --- a/sh/.config/sh/environment.sh +++ /dev/null @@ -1,20 +0,0 @@ -export XDG_CONFIG_HOME="${HOME}/.config" -export XDG_CACHE_HOME="${HOME}/.cache" -export XDG_DATA_HOME="${HOME}/.local/share" - -if [ -d "${HOME}/bin" ] -then - export PATH="${PATH}:${HOME}/bin" -fi - -export CARGO_HOME="${XDG_DATA_HOME}/cargo" -export ELINKS_CONFDIR="${XDG_CONFIG_HOME}/elinks" -export GIMP2_DIRECTORY="${XDG_CONFIG_HOME}/gimp" -export HISTFILE="${XDG_CACHE_HOME}/sh/history" -export LESSHISTFILE="${XDG_CACHE_HOME}/less/history" -export LESSKEY="${XDG_CONFIG_HOME}/less/lesskey" -export NOTMUCH_CONFIG="${XDG_CONFIG_HOME}/notmuch/config" -export NPM_CONFIG_USERCONFIG="${XDG_CONFIG_HOME}/npm/config" -export PASSWORD_STORE_DIR="${XDG_DATA_HOME}/pass" -export XAUTHORITY="${XDG_RUNTIME_DIR}/Xauthority" -export XINITRC="${XDG_CONFIG_HOME}/X11/xinitrc" diff --git a/sh/.profile b/sh/.profile index 399a6ba..36852bc 100644 --- a/sh/.profile +++ b/sh/.profile @@ -1,6 +1,10 @@ -if [ -f "${HOME}/.config/sh/environment.sh" ] +if [ -d "${HOME}/.config/env" ] then - . "${HOME}/.config/sh/environment.sh" + ENV_FILES=`find "${HOME}/.config/env" -type f,l -name "*.sh" | sort` + for ENV_FILE in ${ENV_FILES} + do + . ${ENV_FILE} + done fi if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] |