This commit is contained in:
Robin-Charles Guihéneuf
2026-09-10 21:28:23 +02:00
parent 34e70b669e
commit 40f0a4c947
3 changed files with 168 additions and 34 deletions
+123
View File
@@ -0,0 +1,123 @@
# vulporuza-palettes.zsh
# Sourced by vulporuza.zsh-theme. Requires Oh My Zsh spectrum ($FG) and colors.
#
# Select one with VULPORUZA_PALETTE in ~/.zshrc (before Oh My Zsh):
# current | fox | frost | tokyo | quiet
typeset -ga _vulporuza_keys
_vulporuza_keys=(
dash path branch venv host dirty clean
staged conflicts changed untracked stashed
upstream state error
)
typeset -gA _vulporuza_p_current
_vulporuza_p_current=(
dash "$FG[240]"
path "$FG[208]"
branch "%{$fg_bold[magenta]%}"
venv "$FG[075]"
host "$FG[245]"
dirty "$FG[075]"
clean "$FG[034]"
staged "%{$fg[red]%}"
conflicts "%{$fg[red]%}"
changed "%{$fg[blue]%}"
untracked "%{$fg[cyan]%}"
stashed "%{$fg_bold[blue]%}"
upstream "%{$fg[blue]%}"
state "%{$fg_bold[magenta]%}"
error "%{$fg[red]%}"
)
typeset -gA _vulporuza_p_fox
_vulporuza_p_fox=(
dash "$FG[236]"
path "$FG[166]"
branch "$FG[180]"
venv "$FG[073]"
host "$FG[240]"
dirty "$FG[172]"
clean "$FG[107]"
staged "$FG[167]"
conflicts "$FG[167]"
changed "$FG[109]"
untracked "$FG[080]"
stashed "$FG[110]"
upstream "$FG[109]"
state "$FG[180]"
error "$FG[167]"
)
typeset -gA _vulporuza_p_frost
_vulporuza_p_frost=(
dash "$FG[237]"
path "$FG[109]"
branch "$FG[110]"
venv "$FG[108]"
host "$FG[243]"
dirty "$FG[173]"
clean "$FG[114]"
staged "$FG[167]"
conflicts "$FG[167]"
changed "$FG[109]"
untracked "$FG[080]"
stashed "$FG[110]"
upstream "$FG[110]"
state "$FG[139]"
error "$FG[167]"
)
typeset -gA _vulporuza_p_tokyo
_vulporuza_p_tokyo=(
dash "$FG[237]"
path "$FG[111]"
branch "$FG[141]"
venv "$FG[080]"
host "$FG[242]"
dirty "$FG[215]"
clean "$FG[114]"
staged "$FG[167]"
conflicts "$FG[167]"
changed "$FG[109]"
untracked "$FG[087]"
stashed "$FG[110]"
upstream "$FG[111]"
state "$FG[141]"
error "$FG[167]"
)
typeset -gA _vulporuza_p_quiet
_vulporuza_p_quiet=(
dash "$FG[238]"
path "$FG[208]"
branch "$FG[250]"
venv "$FG[244]"
host "$FG[240]"
dirty "$FG[244]"
clean "$FG[034]"
staged "$FG[167]"
conflicts "$FG[167]"
changed "$FG[109]"
untracked "$FG[080]"
stashed "$FG[110]"
upstream "$FG[244]"
state "$FG[250]"
error "$FG[167]"
)
_vulporuza_apply_palette() {
emulate -L zsh
local name=${VULPORUZA_PALETTE:-current}
if ! (( ${+parameters[_vulporuza_p_$name]} )); then
print -u2 "vulporuza: unknown VULPORUZA_PALETTE '${name}', using current"
name=current
VULPORUZA_PALETTE=current
fi
typeset -gA _vulporuza
_vulporuza=()
local key
for key in "${_vulporuza_keys[@]}"; do
eval "_vulporuza[\$key]=\${_vulporuza_p_${name}[\$key]}"
done
}