themable prompt and some proposed themes

This commit is contained in:
fatalerrors
2026-04-15 13:35:33 +02:00
parent bb9bbfda16
commit 85f02f4498
11 changed files with 759 additions and 18 deletions

32
profile.d/themes/default.theme Executable file
View File

@@ -0,0 +1,32 @@
# Default prompt theme — blue bar, green user, cyan path
# ------------------------------------------------------------------------------
# Theme files are NOT executed as shell scripts. load_theme() parses them
# line by line. Only the following value forms are accepted:
#
# KEY="$ColorVarName" — reference to a colour variable from disp.sh
# KEY="${ColorVarName}" — same with braces
# KEY="\e[...m" — raw ANSI escape sequence (single block)
#
# Accepted keys:
# PROMPT_COLOR_* — prompt slot colours (see profile.conf [prompt])
# Standard colour vars — Black, Blue, On_IBlack, … (overrides the palette
# from disp.sh for the whole shell session)
#
# Any unknown key, unsafe value, or shell construct will be ignored with a
# warning — theme files cannot execute code.
# ------------------------------------------------------------------------------
PROMPT_COLOR_TIME_FG="$Blue" # Clock text
PROMPT_COLOR_TIME_BG="$On_IBlack" # Clock background (dark grey)
PROMPT_COLOR_BAR_BG="$On_Blue" # Main bar background
PROMPT_COLOR_OK_FG="$White" # Exit-code text on success
PROMPT_COLOR_OK_MARK="$Green" # Checkmark colour on success
PROMPT_COLOR_ERR_BG="$On_Red" # Exit-code background on failure
PROMPT_COLOR_ERR_FG="$White" # Exit-code text on failure
PROMPT_COLOR_ERR_MARK="$BYellow" # X mark colour on failure
PROMPT_COLOR_ROOT_FG="$Red" # Username colour when root
PROMPT_COLOR_USER_FG="$Green" # Username@host colour for normal users
PROMPT_COLOR_DIR_FG="$ICyan" # Working directory colour