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>
This commit is contained in:
thomas.koppandClaude Opus 5.5 committed 2026-10-19 00:59:24 +02:00
1 parent 7edb68aaba
commit 4ca0a7ce8b
4 files changed
+39 -61

No files matched your search

+5 -1
View File
@@ -10,7 +10,11 @@
# 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
if [[ "$ROLE" == server ]]; then
# The server draws its own ys-style prompt in 50-server.zsh. A theme loaded
# here would overwrite it before every prompt (p10k does so from precmd).
ZSH_THEME=""
elif [[ -d "${ZSH_CUSTOM:-$ZSH/custom}/themes/powerlevel10k" ]]; then
ZSH_THEME="powerlevel10k/powerlevel10k"
else
# ys is what both machines without powerlevel10k already ran. Without this
+3 -8
View File
@@ -3,14 +3,9 @@
# The theme and DISABLE_AUTO_UPDATE are in 05-pre-omz.zsh, because oh-my-zsh
# reads them while it is being sourced.
# The prompt, in a file of its own because there is more to it than a colour.
# Sourced here rather than earlier: this is the point at which oh-my-zsh has
# loaded powerlevel10k, which is where p10k expects its configuration.
#
# beastix keeps its own ~/.p10k.zsh, sourced from 30-path.zsh. This one is
# separate because a server is reached from whatever terminal is at hand and
# cannot assume the desktop's Nerd Font.
[[ -r "$HOME/.config/zsh/p10k-server.zsh" ]] && source "$HOME/.config/zsh/p10k-server.zsh"
# The prompt: ys layout in gruvbox colours, in a file of its own because
# root's shell uses the same one (installed root-owned, see the file).
[[ -r "$HOME/.config/zsh/server-prompt.zsh" ]] && source "$HOME/.config/zsh/server-prompt.zsh"
# German locale. The base does not set one, since the desktop inherits it from
# the session and the Mac has its own; an SSH session brings only what the