The colour was in 05-prompt.zsh, before oh-my-zsh. That is right for ZSH_THEME and wrong for everything else: ~/.p10k.zsh assigns POWERLEVEL9K_CONTEXT_BACKGROUND itself and is sourced from 30-path.zsh, so the role colour was overwritten before the first prompt was drawn. The isolated test missed it because the throwaway HOME had no .p10k.zsh; on the real machine the desktop came up with 0 instead of blue. Theme before oh-my-zsh, colour after .p10k.zsh - two different constraints that happen to pull in opposite directions. The config alias was missing entirely. Without it the bare repository has no front end, which makes the whole arrangement unusable. Guarded on ~/.cfg existing so the alias does not appear on a machine that has not been set up. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
16 lines
704 B
Bash
16 lines
704 B
Bash
# Theme selection. Sourced by the stub BEFORE oh-my-zsh, and that placement is
|
|
# the point of the file.
|
|
#
|
|
# oh-my-zsh loads the theme while it is being sourced, so ZSH_THEME set
|
|
# afterwards is ignored - the first attempt put it in the role file and produced
|
|
# a shell reporting the right value while running without powerlevel10k at all.
|
|
#
|
|
# The role COLOUR is deliberately not here. ~/.p10k.zsh sets
|
|
# POWERLEVEL9K_CONTEXT_BACKGROUND itself and is sourced later, so a colour set
|
|
# here is overwritten before the first prompt is ever drawn. It lives in the
|
|
# role files, which come after.
|
|
|
|
if [[ -d "${ZSH_CUSTOM:-$ZSH/custom}/themes/powerlevel10k" ]]; then
|
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
|
fi
|