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>
23 lines
988 B
Bash
23 lines
988 B
Bash
# Role: mobile (the Mac - macOS on Apple Silicon)
|
|
#
|
|
# Homebrew's shellenv belongs in .zprofile, not here: a non-login shell would
|
|
# otherwise have no /opt/homebrew/bin in PATH. That is not theory - during the
|
|
# design phase "ssh mac brew --version" came back empty for exactly that
|
|
# reason, and was briefly mistaken for Homebrew not being installed.
|
|
|
|
# Apple Silicon puts Homebrew under /opt/homebrew; Intel Macs use /usr/local.
|
|
# Checked rather than assumed, so the same file works on either.
|
|
for _b in /opt/homebrew /usr/local; do
|
|
if [[ -x "$_b/bin/brew" ]]; then
|
|
eval "$("$_b/bin/brew" shellenv)"
|
|
break
|
|
fi
|
|
done
|
|
unset _b
|
|
|
|
# Role colour, set here rather than in 05-prompt.zsh because ~/.p10k.zsh
|
|
# assigns POWERLEVEL9K_CONTEXT_BACKGROUND itself and is sourced in 30-path.zsh.
|
|
# Anything set before that is silently replaced. Not decoration: shron carries
|
|
# mail, web and cloud, and a glance should say which machine this is.
|
|
typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=green
|