summaryrefslogtreecommitdiff
path: root/etc/rc
blob: 6a6420943502465870c1af93e4f240aa2f73c0df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
## vim:ft=zsh
## Copyright (c) 2008, 2009 by Daniel Friesel <derf@derf.homelinux.org>
## Unless otherwise noted, this Licence applies to all files sourced here:
##   0. You just DO WHAT THE FUCK YOU WANT TO.
##
## https://derf.homelinux.org/~derf/dotfiles/zsh/rc
## see also: https://derf.homelinux.org/~derf/dotfiles/zsh/

# for system-specific setup
system=${$(uname):l}
alias 'linux:'='[[ $system == linux ]] &&'
alias 'openbsd:'='[[ $system == openbsd ]] &&'
if [[ $system == linux ]] {
	[[ -f /etc/debian_version ]] && distro=debian
}

function zrc_status {
	echo -n "\r\e[2K${info}--${reset} $*"
}

# include the actual config
source $ZDIR/options
source $ZDIR/colors
source $ZDIR/parameters
source $ZDIR/function
source $ZDIR/zle
source $ZDIR/prompt
source $ZDIR/directories
source $ZDIR/keys
source $ZDIR/alias

zrc_status "includes"
source $ZDIR/../provided/includes
xsource $ZDIR/local                     # local configuration, not in git
xsource $HOME/var/tmp/envstore-raw-$UID # envstore
xsource $ZDIR/hosts/$HOST               # local configuration in git

source $ZDIR/completion

# misc
check_com -c dircolors && eval $(dircolors -b $HOME/packages/zsh/etc/dircolors)
mesg n
umask 077
chpwd

# cleanup
echo -n "\r\e[2K"
unalias 'linux:'
unalias 'openbsd:'
unfunction zrc_status
unfunction xexport xsource
unset system distro
unset ps_fail ps_green ps_info ps_red ps_reset ps_yellow