-## wayland/sway
-# XXX: only do this if we're actually in wayland, but without a start script
-export XDG_SESSION_TYPE=wayland
-export QT_QPA_PLATFORM=wayland-egl
-export QT_WAYLAND_DISABLE_WINDOWDECORATION=-1
-export SDL_VIDEODRIVER=wayland
-export TERMINAL=${$(whence -p konsole footclient urxvt xterm)[(f)1]}
+## wayland/gui env
+export XDG_SESSION_TYPE=${XDG_SESSION_TYPE:-wayland}
+export QT_QPA_PLATFORM=${QT_QPA_PLATFORM:-wayland-egl}
+export QT_WAYLAND_DISABLE_WINDOWDECORATION=${QT_WAYLAND_DISABLE_WINDOWDECORATION:--1}
+export SDL_VIDEODRIVER=${SDL_VIDEODRIVER:-wayland}
+export TERMINAL=${TERMINAL:-$(whence -p konsole footclient urxvt xterm)[(f)1]}
+
+### imports
+autoload -Uz zmv
+autoload -Uz zmathfunc && zmathfunc
+
+## vcs
+zstyle ':vcs_info:*' enable git
+#zstyle ':vcs_info:git*' check-for-changes true #too slow
+zstyle ':vcs_info:git*:dotfiles' check-for-changes true
+zstyle ':vcs_info:git*' check-for-staged-changes true
+autoload -Uz vcs_info
+
+## compinit
+zstyle ':completion:*' auto-description '[arg] %d'
+zstyle ':completion:*' expand suffix
+zstyle ':completion:*' format '# %d'
+zstyle ':completion:*' group-name ''
+zstyle ':completion:*' ignore-parents parent
+zstyle ':completion:*' insert-unambiguous false
+zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
+zstyle ':completion:*' list-prompt '%B%i%b'
+zstyle ':completion:*' list-suffixes true
+zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._-]=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
+zstyle ':completion:*' menu select=1
+zstyle ':completion:*' original false
+zstyle ':completion:*' select-prompt '%B%l%b'
+zstyle ':completion:*' verbose true
+autoload -Uz compinit
+cache=${XDG_CACHE_HOME:-~/.cache}/zsh
+[[ -d $cache ]] || mkdir -p $cache
+compinit -d $cache/.zcompdump
+unset cache