From: Jannik Zander Date: Sun, 22 May 2016 11:47:25 +0000 (+0200) Subject: Move path and exports to profile X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=c1a578975451f1de79cbbdcd4f2d502968184862;p=dotfiles.git Move path and exports to profile --- diff --git a/.bashrc b/.bashrc index d1aca1d..3294677 100644 --- a/.bashrc +++ b/.bashrc @@ -7,6 +7,3 @@ for file in ${HOME}/.config/bash/rc/*; do [ -f "$file" ] && source "$file"; done; - -# Local/private settings -[ -f "${HOME}/.config/bash/bashrc_local" ] && source "${HOME}/.config/bash/bashrc_local" diff --git a/.config/bash/rc/exports b/.config/bash/rc/exports deleted file mode 100644 index 4e7c412..0000000 --- a/.config/bash/rc/exports +++ /dev/null @@ -1,39 +0,0 @@ - -# Make vim the default editor -export EDITOR="vim"; -export VISUAL="vim"; -#export MYVIMRC="$HOME/.config/vim/vimrc" - -# Larger bash history (allow 32³ entries; default is 500) -export HISTSIZE=32768; -export HISTFILESIZE=$HISTSIZE; -export HISTCONTROL=ignoreboth; -# Make some commands not show up in history -export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"; -export HISTFILE="$HOME/.cache/bash/history"; -# Whenever displaying the prompt, write the previous line to disk -export PROMPT_COMMAND="history -a"; - -# Prefer US English and use UTF-8 -# export LANG=$(locale -uU) -export LANG="en_US.UTF-8"; -export LC_ALL="en_US.UTF-8"; - -# Highlight section titles in manual pages -export LESS_TERMCAP_md="${yellow}"; - -# Don’t clear the screen after quitting a manual page -export MANPAGER="less -X"; - -# Always enable colored `grep` output -#export GREP_OPTIONS="--color=auto"; - -# Set up syntax highlighting for 'less' (requires source-highlight package) -# See http://www.gnu.org/software/src-highlite/source-highlight.html -# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" -export LESS=-eFRX - -# Tell lynx where the color settings are that were adjusted for the -# Solarized color scheme -export LYNX_LSS=$HOME/.config/lynx.lss - diff --git a/.config/bash/rc/paths b/.config/bash/rc/paths deleted file mode 100644 index eec134f..0000000 --- a/.config/bash/rc/paths +++ /dev/null @@ -1,32 +0,0 @@ - -# Set PATH so it includes user's private bin if it exists -# if [ -d "${HOME}/bin" ] ; then -# PATH="${HOME}/bin:${PATH}" -# fi - -# Set MANPATH so it includes users' private man if it exists -# if [ -d "${HOME}/man" ]; then -# MANPATH="${HOME}/man:${MANPATH}" -# fi - -# Set INFOPATH so it includes users' private info if it exists -# if [ -d "${HOME}/info" ]; then -# INFOPATH="${HOME}/info:${INFOPATH}" -# fi - -# Set PATH to temporary folders -export TEMPDIR="${HOME}/tmp" -export TMPDIR="${HOME}/tmp" - -# Set PATH to dotfiles git folder -export DOTFILES="${HOME}/.dotfiles" - -# Set PATH to PREFIX folders -export PREFIX="${HOME}" - -PATH="${PREFIX}/bin:${PATH}" -MANPATH="${PREFIX}/share/man:${MANPATH}" -INFOPATH="${PREFIX}/share/info:${INFOPATH}" - -# Add local libraries to libpath -# LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH}" diff --git a/.config/profile/rc/exports b/.config/profile/rc/exports new file mode 100644 index 0000000..4e7c412 --- /dev/null +++ b/.config/profile/rc/exports @@ -0,0 +1,39 @@ + +# Make vim the default editor +export EDITOR="vim"; +export VISUAL="vim"; +#export MYVIMRC="$HOME/.config/vim/vimrc" + +# Larger bash history (allow 32³ entries; default is 500) +export HISTSIZE=32768; +export HISTFILESIZE=$HISTSIZE; +export HISTCONTROL=ignoreboth; +# Make some commands not show up in history +export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"; +export HISTFILE="$HOME/.cache/bash/history"; +# Whenever displaying the prompt, write the previous line to disk +export PROMPT_COMMAND="history -a"; + +# Prefer US English and use UTF-8 +# export LANG=$(locale -uU) +export LANG="en_US.UTF-8"; +export LC_ALL="en_US.UTF-8"; + +# Highlight section titles in manual pages +export LESS_TERMCAP_md="${yellow}"; + +# Don’t clear the screen after quitting a manual page +export MANPAGER="less -X"; + +# Always enable colored `grep` output +#export GREP_OPTIONS="--color=auto"; + +# Set up syntax highlighting for 'less' (requires source-highlight package) +# See http://www.gnu.org/software/src-highlite/source-highlight.html +# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" +export LESS=-eFRX + +# Tell lynx where the color settings are that were adjusted for the +# Solarized color scheme +export LYNX_LSS=$HOME/.config/lynx.lss + diff --git a/.config/profile/rc/paths b/.config/profile/rc/paths new file mode 100644 index 0000000..c3cf39a --- /dev/null +++ b/.config/profile/rc/paths @@ -0,0 +1,25 @@ + +# Set PATH so it includes user's private bin if it exists +if [ -d "${HOME}/bin" ] ; then + PATH="${HOME}/bin:${PATH}" +fi + +# Set MANPATH so it includes users' private man if it exists +if [ -d "${HOME}/man" ]; then + MANPATH="${HOME}/man:${MANPATH}" +fi + +# Set INFOPATH so it includes users' private info if it exists +if [ -d "${HOME}/info" ]; then + INFOPATH="${HOME}/info:${INFOPATH}" +fi + +# Set PATH to temporary folders +export TEMPDIR="${HOME}/tmp" +export TMPDIR="${HOME}/tmp" + +# Set PATH to PREFIX folders +export PREFIX="${HOME}" + +# Add local libraries to libpath +# LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH}" diff --git a/.profile b/.profile index e7c2b1c..6a67f4f 100644 --- a/.profile +++ b/.profile @@ -2,7 +2,12 @@ # This file is not read by bash(1) if ~/.bash_profile or ~/.bash_login # exists. -# + +# Run scripts +for file in ${HOME}/.config/profile/rc/*; do + [ -f "$file" ] && source "$file"; +done; + # if running bash if [ -n "${BASH_VERSION}" ]; then # source the users bashrc if it exists