summaryrefslogtreecommitdiff
path: root/etc/rc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc47
1 files changed, 16 insertions, 31 deletions
diff --git a/etc/rc b/etc/rc
index 15337e6..2a1fec2 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,39 +1,14 @@
## vim:ft=zsh
-autoload -Uz compinit
-autoload colors
-autoload zargs
-compinit -C
-colors
-bindkey -e # EMACS bindings
-zstyle :compinstall filename "$HOME/.zshrc"
-
-## zsh vars
-HISTFILE=~/.histfile
-HISTSIZE=10000
-SAVEHIST=$HISTSIZE
-DIRSTACKSIZE=20
+## internal stuff
ZDIR=$HOME/packages/zsh/etc
uname=$(uname)
+alias 'linux:'='[ $uname = Linux ] &&'
+alias 'openbsd:'='[ $uname = OpenBSD ] &&'
-## other vars
-export PATH=$HOME/bin:$PATH
-export EDITOR==vim
-export MPD_HOST=saviour
-[ $uname = Linux ] && export LANG=en_US.UTF-8
-[ $uname = OpenBSD ] && export PKG_PATH="ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`machine -a`/:ftp://openbsd.ftp.fu-berlin.de/pub/OpenBSD/`uname -r`/packages/`machine -a`/"
-export HOST
-[ $uname = Linux -a -z "$MANPATH" ] && export MANPATH=$(manpath):$HOME/packages/.collected/man
-
-# Fancy directory colors
-[ $uname = Linux ] && eval $(dircolors -b $HOME/packages/zsh/etc/dircolors)
-
-## Host completion
-_hosts() { compadd alpha beta gamma kraftwerk delta epsilon zeta eta saviour theta iota kappa nemesis lambda;}
-
-## Show exitcode on failure
-trap 'echo zsh: Program terminated with exit status $?' ZERR
-
+## include the actual config
+source $ZDIR/modules
+source $ZDIR/variables
source $ZDIR/colors
source $ZDIR/functions
source $ZDIR/options
@@ -46,5 +21,15 @@ source $ZDIR/alias/global
source $ZDIR/alias/short
source $ZDIR/completion
+## misc
+bindkey -e # EMACS bindings
+linux: eval $(dircolors -b $HOME/packages/zsh/etc/dircolors)
+trap 'echo zsh: Program terminated with exit status $?' ZERR
mesg n
umask 077
+
+## cleanup
+unalias 'linux:'
+unalias 'openbsd:'
+unset ZDIR
+unset uname