]> git.rmz.io Git - dotfiles.git/blob - zshrc
awesome: actually... autostarting steam is a bad idea
[dotfiles.git] / zshrc
1 # Path to config files
2 ZSH=$XDG_CONFIG_HOME/zsh
3 [[ ! -d "$ZSH" ]] && echo "Missing config dir: '$ZSH'" && return
4
5 # Load all of the config files in $ZSH/lib that end in .zsh
6 for config_file ($ZSH/lib/*.zsh); do
7 source $config_file
8 done
9
10 # Set name of the theme to load.
11 # Look in $ZSH/themes
12 ZSH_THEME="ramsi"
13 [[ -f "$ZSH/themes/${ZSH_THEME}.zsh-theme" ]] && source "$ZSH/themes/${ZSH_THEME}.zsh-theme"
14
15 # load my functions
16 typeset -U fpath # make fpath a unique array
17 [[ -d ~/.zsh/functions ]] && fpath=(~/.zsh/functions $fpath)
18 autoload -U ${fpath[1]}/*(:t) # loads all functions in the first element of fpath
19
20 # initialise completion
21 [[ -d "$XDG_CACHE_HOME/zsh" ]] || mkdir -p "$XDG_CACHE_HOME/zsh"
22 autoload -U compinit; compinit -d "$XDG_CACHE_HOME/zsh/zcompdump"
23
24 # miscelaneous options
25 setopt extendedglob
26 setopt cshnullglob # if glob does not match, remove pattern, if no glob matches print error
27 setopt numeric_glob_sort # sort numerically not lexically
28 setopt noclobber # don't allow overwriting files with '>', use '>!' instead
29 setopt notify
30 setopt rcquotes # echo 'don''t'; prints don't
31 setopt dvorak # correct_all uses dvorak
32
33 # populate path
34 typeset -U path # make path a unique array
35 [[ -d ~/.local/bin ]] && path=(~/.local/bin $path)
36 [[ -d ~/bin ]] && path=(~/bin $path)
37 [[ -d /extra ]] && path=($path /extra/bin /extra/usr/bin /extra/sbin /extra/usr/sbin)
38 [[ -d /opt/android-sdk ]] && path=($path /opt/android-sdk/platform-tools)
39
40 # source aliases
41 [[ -f ~/.aliases ]] && source ~/.aliases
42 for alias_file ($ZSH/aliases/*.zsh); do
43 source $alias_file
44 done
45
46 # vim stuff
47 [[ -d "$XDG_CACHE_HOME/vim" ]] || mkdir -p "$XDG_CACHE_HOME/vim"
48 export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC'
49 export EDITOR=vim
50 export VISUAL=vim
51
52 # default browser
53 export BROWSER=dwb
54
55 # set up a few named directories
56 hash -d Skaro=/mnt/Skaro
57 hash -d ccr=~/ccr
58 hash -d src=~/src
59 hash -d chroot_testing=/buildsystem/testing/buildroot
60 hash -d chroot_master=/buildsystem/master/buildroot
61 hash -d chroot_lib32=/buildsystem/lib32/buildroot
62 hash -d wineprefixes=/mnt/data/wineprefixes
63 hash -d UniMaas=~/dropbox/Documents/UniMaas
64
65 # set some env variables
66 export _gamedir=/mnt/Skaro/Games/Linux/HumbleBundle
67
68 # ros
69 if [[ -f "/opt/ros/groovy/setup.zsh" ]]; then
70 export ROS_WORKSPACE=~/src/ros
71 export ROS_OS_OVERRIDE=arch
72 fi