* Exports reworked. Now every export type have own file.

This commit is contained in:
Stanislav Nikitin 2015-03-01 10:09:06 +05:00
parent da3e638cf9
commit 0a7df3a77b
6 changed files with 29 additions and 12 deletions

View File

@ -1,11 +1,3 @@
export PATH="/home/pztrn/bin:/usr/lib:/usr/lib/colorgcc/bin:/usr/sbin:/sbin:/usr/local/heroku/bin:/data/Programs/hyde:$PATH"
export EDITOR=nano
# More or less pretty fonts in Java programs.
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
export JAVA_FONTS=/usr/share/fonts/TTF
# PyENV.
export PYENV_ROOT="/data/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
for config_file in `ls ${CONFIG_PATH}/zsh/exports | sort | grep zsh`; do
source ${CONFIG_PATH}/zsh/exports/${config_file}
done

5
zsh/exports/01-path.zsh Normal file
View File

@ -0,0 +1,5 @@
# This is default PATHs.
export PATH="/usr/lib:/usr/lib/colorgcc/bin:/usr/sbin:/sbin:$PATH"
# Add here your own.
export PATH="$PATH:/usr/local/heroku/bin:/data/Programs/hyde:/home/pztrn/bin"

View File

@ -0,0 +1,2 @@
# This file is used to override EDITOR variable.
EDITOR="nano"

View File

@ -0,0 +1,4 @@
# Java-specific exports.
# More or less pretty fonts in Java programs.
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
export JAVA_FONTS=/usr/share/fonts/TTF

9
zsh/exports/95-pyenv.zsh Normal file
View File

@ -0,0 +1,9 @@
# PyENV exports.
# This exports should work only if config states this.
if [ "${USE_PYENV}" -eq 0 ]; then
return
fi
export PATH="${PYENV_PATH}/bin:$PATH"
eval "$(pyenv init -)"

7
zshrc
View File

@ -18,6 +18,11 @@ PROMPT_THEME="pztrn"
# nVidia users with proprietary drivers - sorry, you can't use it.
USE_FBTERM=0
# PyENV in use?
USE_PYENV=0
# Path to PyENV.
PYENV_PATH="/data/.pyenv"
#####################################################################
# INITIALIZATION
# --------------
@ -46,7 +51,7 @@ if [ $CONFIG_FOUND -eq 1 ]; then
source ${CONFIG_PATH}/zsh/${config_file}
done
else
echo "Failed to load configuration."
error "Failed to load configuration."
fi
set -B