APATH := $(realpath .)
FILES := bin
-DOTFILES := aliases bash* conky* flexget git* goobookrc msmtp* mutt ncmpcpp offlineimap* vim* weechat xbindkeysrc Xresources xprofile zsh*
-CONFIGFILES := compton.conf mimeo.conf mpd retroarch xkb
+DOTFILES := aliases bash* conky* flexget git* goobookrc msmtp* mutt ncmpcpp offlineimap* profile vim* weechat xbindkeysrc Xresources xprofile zprofile zshrc
+CONFIGFILES := compton.conf mimeo.conf mpd retroarch xkb zsh
.PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES)
install: $(FILES) $(DOTFILES) $(CONFIGFILES)
--- /dev/null
+export PATH="$HOME/bin:$PATH"
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_DATA_HOME="$HOME/.local/share"
+export XDG_CACHE_HOME="$HOME/.cache"
--- /dev/null
+emulate sh -c 'source ~/.profile'
!custom/example.zsh
*.swp
!custom/example.zshcache
-cache/
zstyle ':completion:*:hosts' hosts $hosts
# Use caching so that commands like apt and dpkg complete are useable
+[[ -d "$XDG_CACHE_HOME/zsh" ]] || mkdir -p "$XDG_CACHE_HOME/zsh"
zstyle ':completion::complete:*' use-cache 1
-zstyle ':completion::complete:*' cache-path $ZSH/cache/
+zstyle ':completion::complete:*' cache-path $XDG_CACHE_HOME/zsh
# Don't complete uninteresting users
zstyle ':completion:*:*:*:users' ignored-patterns \
-# Path to your oh-my-zsh configuration.
-ZSH=$HOME/.zsh
+# Path to config files
+ZSH=$XDG_CONFIG_HOME/zsh
+[[ ! -d "$ZSH" ]] && echo "Missing config dir: '$ZSH'" && return
# Load all of the config files in $ZSH/lib that end in .zsh
for config_file ($ZSH/lib/*.zsh); do
[[ -d ~/.zsh/functions ]] && fpath=(~/.zsh/functions $fpath)
autoload -U ${fpath[1]}/*(:t) # loads all functions in the first element of fpath
-autoload -U compinit; compinit
+# initialise completion
+[[ -d "$XDG_CACHE_HOME/zsh" ]] || mkdir -p "$XDG_CACHE_HOME/zsh"
+autoload -U compinit; compinit -d "$XDG_CACHE_HOME/zsh/zcompdump"
# miscelaneous options
setopt extendedglob