# Everything that has to be set before oh-my-zsh is sourced, and nothing else. # # oh-my-zsh reads the theme and its own settings while being sourced, so any of # these placed in a role file - which comes afterwards - is silently ignored. # The first attempt put ZSH_THEME in the role file and produced a shell that # reported the right value while running without powerlevel10k at all. # # The role COLOUR is deliberately NOT here. ~/.p10k.zsh assigns # POWERLEVEL9K_CONTEXT_BACKGROUND itself and is sourced later from # 30-path.zsh, so a colour set here is overwritten before the first prompt is # drawn. It belongs in the role files, which run after that. if [[ -d "${ZSH_CUSTOM:-$ZSH/custom}/themes/powerlevel10k" ]]; then ZSH_THEME="powerlevel10k/powerlevel10k" elif [[ "$ROLE" == "server" ]]; then # What shron already used. Without this it would silently fall back to # oh-my-zsh's default, which is a change nobody asked for. ZSH_THEME="ys" fi case "$ROLE" in server) # A server should not decide on its own to go fetching updates while # someone is logged in trying to fix something. DISABLE_AUTO_UPDATE="true" ;; *) zstyle ':omz:update' mode auto ;; esac