Files
dotconfs/.config/zsh/server-prompt.zsh
T
thomas.koppandClaude Opus 5.5 4ca0a7ce8b feat(zsh): ys-style gruvbox prompt on servers instead of p10k
Thomas prefers the two-line ys layout root already had. user@host in
gruvbox red (a red block for root) marks the machine. Shared file so
root's shell can use a root-owned copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 00:59:24 +02:00

32 lines
1.1 KiB
Bash

# Prompt for the server role: oh-my-zsh's ys layout in gruvbox colours.
#
# Replaces powerlevel10k on shron. Two lines, plain ASCII, readable from any
# terminal. Fixed 256-colour indices approximating gruvbox, because terminal
# themes remap the 16 named colours freely - under gruvbox "white" on "blue"
# was barely legible.
#
# user@host is what has to stand out: plain red for templis, a red block for
# root. The same file is installed root-owned for root's shell (never sourced
# from this home directory, which would let templis run code as root).
#
# Needs oh-my-zsh loaded first (git_prompt_info) and no other theme active.
# gruvbox (256-colour): red 167, yellow 214, green 142, aqua 108, blue 109,
# grey 245, dark background 235
ZSH_THEME_GIT_PROMPT_PREFIX=" %F{245}on%f git:%F{108}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%f"
ZSH_THEME_GIT_PROMPT_DIRTY=" %F{167}x"
ZSH_THEME_GIT_PROMPT_CLEAN=" %F{142}o"
setopt PROMPT_SUBST
PROMPT='
%B%(#,%F{167},%F{109})#%f%b \
%(#,%K{167}%F{235}%B %n@%m %b%f%k,%B%F{167}%n@%m%f%b) \
%F{245}in%f \
%B%F{214}%~%f%b\
$(git_prompt_info) \
%F{245}[%*]%f%(?,, C:%F{167}%?%f)
%B%F{167}%#%f%b '
RPROMPT=''