]> git.rmz.io Git - dotfiles.git/blob - zshrc
qutebrowser: update configs
[dotfiles.git] / zshrc
1 # Path to config files
2 ZSH=$XDG_CONFIG_HOME/zsh
3 ZSH_CACHE=$XDG_CACHE_HOME/zsh
4 [[ ! -d "$ZSH" ]] && echo "Missing config dir: '$ZSH'" && return
5 [[ ! -d "$ZSH_CACHE" ]] && echo "Missing cache dir: '$ZSH_CACHE'" && return
6
7 # Load all of the config files in $ZSH/lib that end in .zsh
8 for config_file ($ZSH/lib/*.zsh); do
9 source $config_file
10 done
11
12 # Set name of the theme to load.
13 # Look in $ZSH/themes
14 ZSH_THEME="ramsi"
15 [[ -f "$ZSH/themes/${ZSH_THEME}.zsh-theme" ]] && source "$ZSH/themes/${ZSH_THEME}.zsh-theme"
16
17 # load my functions
18 typeset -U fpath # make fpath a unique array
19 [[ -d $ZSH/functions ]] && fpath=($ZSH/functions $fpath)
20 autoload -U ${fpath[1]}/*(:t) # loads all functions in the first element of fpath
21
22 # initialise completion
23 autoload -U compinit; compinit -d "$ZSH_CACHE/zcompdump"
24
25 # miscelaneous options
26 setopt extendedglob
27 setopt nonomatch # if glob does not match, pass it to the command
28 setopt numeric_glob_sort # sort numerically not lexically
29 setopt noclobber # don't allow overwriting files with '>', use '>!' instead
30 setopt notify
31 setopt rcquotes # echo 'don''t'; prints don't
32 setopt dvorak # correct_all uses dvorak
33 setopt rematch_pcre # use perl regexp
34
35 # disable flow control
36 setopt noflowcontrol
37 stty -ixon
38
39 # populate path
40 typeset -U path # make path a unique array
41 [[ -d ~/.local/bin ]] && path=(~/.local/bin $path)
42 [[ -d ~/bin ]] && path=(~/bin $path)
43 [[ -d /opt/android-sdk ]] && path=($path /opt/android-sdk/platform-tools)
44
45 # source aliases
46 [[ -f $XDG_CONFIG_HOME/aliases ]] && source $XDG_CONFIG_HOME/aliases
47 for alias_file ($ZSH/aliases/*.zsh); do
48 source $alias_file
49 done
50
51 # set up a few named directories
52 hash -d fook=/mnt/fook
53 hash -d ccr=~/ccr
54 hash -d src=~/src
55 hash -d chroot_testing=/buildsystem/testing/buildroot
56 hash -d chroot_master=/buildsystem/master/buildroot
57 hash -d chroot_lib32=/buildsystem/lib32/buildroot
58 hash -d wineprefixes=/mnt/data/wineprefixes
59 hash -d UniMaas=~/dropbox/Documents/UniMaas
60
61 # set some env variables
62 export _gamedir=/mnt/Skaro/Games/Linux/HumbleBundle