2012-06-15 16:54:02 +02:00
|
|
|
################################################################################
|
|
|
|
## Shell Config -- Master File
|
2013-07-31 08:35:25 +02:00
|
|
|
## Date 2013-07-29
|
2012-06-15 16:54:02 +02:00
|
|
|
################################################################################
|
|
|
|
|
|
|
|
##==============================================================================
|
|
|
|
## Sourcing
|
|
|
|
##==============================================================================
|
|
|
|
|
2012-10-29 17:22:41 +01:00
|
|
|
SHELL_CURRENT="$(ps -o command="" $$)"
|
2012-08-13 18:18:56 +02:00
|
|
|
SHELL_DIR="$HOME/.shell.d"
|
2012-06-15 16:54:02 +02:00
|
|
|
|
2013-07-25 21:12:09 +02:00
|
|
|
## .profile is sourced automatically when X is started, but we need to source it
|
|
|
|
## manually to TTY.
|
|
|
|
[ -z "$DISPLAY" ] && [ -f "$HOME/.profile" ] && . "$HOME/.profile"
|
|
|
|
|
2013-07-29 20:10:12 +02:00
|
|
|
loadrc()
|
|
|
|
{
|
|
|
|
for i; do
|
|
|
|
[ -f "${SHELL_DIR}/$i" ] && . "${SHELL_DIR}/$i"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
## main and options should be sourced first.
|
|
|
|
loadrc main_rc options_zsh
|
2012-07-19 17:01:22 +02:00
|
|
|
|
2012-08-13 18:18:56 +02:00
|
|
|
## Source order should not matter.
|
2013-07-29 20:10:12 +02:00
|
|
|
loadrc keys_zsh
|
|
|
|
loadrc alias_rc colors_rc completion_rc funs_rc
|
2013-05-22 17:54:53 +02:00
|
|
|
|
2013-09-10 14:58:15 +02:00
|
|
|
## Shell hook: should be sourced last.
|
|
|
|
loadrc hook
|
|
|
|
|
2013-07-28 11:48:24 +02:00
|
|
|
## Browser autostart. See .scripts/browser-autostart
|
2013-08-05 00:56:23 +02:00
|
|
|
[ -n "$BROWSER_AUTOSTART" ] && unset BROWSER_AUTOSTART && browse
|