Files
profile/profile.d/themes/solarized.theme
2026-04-15 16:53:33 +02:00

123 lines
6.0 KiB
Plaintext
Executable File

# Solarized Dark prompt theme — exact 24-bit / true-colour palette
# ------------------------------------------------------------------------------
# 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.
# ------------------------------------------------------------------------------
# Requires a terminal with true-colour / 24-bit support.
# Check with: printf '\e[38;2;220;50;47mred\e[0m\n'
# If you see solid red text, your terminal supports this theme.
# (konsole, iTerm2, kitty, alacritty, Windows Terminal all do)
#
# Solarized Dark exact hex → RGB mapping used below:
# Base03 #002b36 → 0 43 54 (darkest background)
# Base02 #073642 → 7 54 66 (background highlights)
# Base01 #586e75 → 88 110 117 (comments / secondary content)
# Base00 #657b83 →101 123 131 (body text — dark background)
# Base0 #839496 →131 148 150 (body text — main)
# Base1 #93a1a1 →147 161 161 (optional emphasis)
# Yellow #b58900 →181 137 0
# Orange #cb4b16 →203 75 22
# Red #dc322f →220 50 47
# Magenta #d33682 →211 54 130
# Violet #6c71c4 →108 113 196
# Blue #268bd2 → 38 139 210
# Cyan #2aa198 → 42 161 152
# Green #859900 →133 153 0
# ------------------------------------------------------------------------------
# ---- Foreground palette overrides -------------------------------------------
# Regular
Black="\e[38;2;0;43;54m" # Base03 — darkest content fg
Red="\e[38;2;220;50;47m" # Red
Green="\e[38;2;133;153;0m" # Green
Yellow="\e[38;2;181;137;0m" # Yellow — primary accent
Blue="\e[38;2;38;139;210m" # Blue
Purple="\e[38;2;211;54;130m" # Magenta
Cyan="\e[38;2;42;161;152m" # Cyan
White="\e[38;2;131;148;150m" # Base0 — body text
# Bold
BBlack="\e[1;38;2;7;54;66m" # Base02 bold
BRed="\e[1;38;2;220;50;47m" # Red bold
BGreen="\e[1;38;2;133;153;0m" # Green bold
BYellow="\e[1;38;2;181;137;0m" # Yellow bold
BBlue="\e[1;38;2;38;139;210m" # Blue bold
BPurple="\e[1;38;2;211;54;130m" # Magenta bold
BCyan="\e[1;38;2;42;161;152m" # Cyan bold
BWhite="\e[1;38;2;147;161;161m" # Base1 bold
# High intensity (brighter / emphasis roles in Solarized)
IBlack="\e[38;2;88;110;117m" # Base01 — secondary/comments
IRed="\e[38;2;203;75;22m" # Orange — Solarized's "bright red"
IGreen="\e[38;2;133;153;0m" # Green (no brighter variant)
IYellow="\e[38;2;181;137;0m" # Yellow (no brighter variant)
IBlue="\e[38;2;108;113;196m" # Violet — Solarized's "bright blue"
IPurple="\e[38;2;211;54;130m" # Magenta (no brighter variant)
ICyan="\e[38;2;42;161;152m" # Cyan (no brighter variant)
IWhite="\e[38;2;147;161;161m" # Base1 — optional emphasis
# Bold high intensity
BIBlack="\e[1;38;2;88;110;117m" # Base01 bold
BIRed="\e[1;38;2;203;75;22m" # Orange bold
BIGreen="\e[1;38;2;133;153;0m" # Green bold
BIYellow="\e[1;38;2;181;137;0m" # Yellow bold
BIBlue="\e[1;38;2;108;113;196m" # Violet bold
BIPurple="\e[1;38;2;211;54;130m" # Magenta bold
BICyan="\e[1;38;2;42;161;152m" # Cyan bold
BIWhite="\e[1;38;2;147;161;161m" # Base1 bold
# ---- Background palette overrides -------------------------------------------
On_Black="\e[48;2;0;43;54m" # Base03
On_Red="\e[48;2;220;50;47m" # Red
On_Green="\e[48;2;133;153;0m" # Green
On_Yellow="\e[48;2;181;137;0m" # Yellow
On_Blue="\e[48;2;38;139;210m" # Blue
On_Purple="\e[48;2;211;54;130m" # Magenta
On_Cyan="\e[48;2;42;161;152m" # Cyan
On_White="\e[48;2;131;148;150m" # Base0
On_IBlack="\e[48;2;7;54;66m" # Base02 — background highlights
On_IRed="\e[48;2;203;75;22m" # Orange
On_IGreen="\e[48;2;133;153;0m" # Green
On_IYellow="\e[48;2;181;137;0m" # Yellow
On_IBlue="\e[48;2;108;113;196m" # Violet
On_IPurple="\e[48;2;211;54;130m" # Magenta
On_ICyan="\e[48;2;42;161;152m" # Cyan
On_IWhite="\e[48;2;147;161;161m" # Base1
# ---- Special codes ----------------------------------------------------------
DEFAULTFG="\e[38;2;131;148;150m" # Base0 — default foreground
DEFAULTBG="\e[48;2;0;43;54m" # Base03 — default background
RESETCOL="\e[0m"
# ---- Prompt colour slots ----------------------------------------------------
# All specified as direct ANSI sequences to avoid ordering dependencies
# with the palette overrides above.
PROMPT_COLOR_TIME_FG="\e[38;2;181;137;0m" # Yellow — primary accent
PROMPT_COLOR_TIME_BG="\e[48;2;0;43;54m" # Base03 — darkest background
PROMPT_COLOR_BAR_BG="\e[48;2;88;110;117m" # Base01 — slightly brighter bar (was Base02)
PROMPT_COLOR_OK_FG="\e[38;2;131;148;150m" # Base0 — body text on success
PROMPT_COLOR_OK_MARK="\e[38;2;133;153;0m" # Green — checkmark
PROMPT_COLOR_ERR_BG="\e[48;2;180;20;15m" # deeper crimson — more contrast than Solarized Red
PROMPT_COLOR_ERR_FG="\e[1;38;2;255;255;255m" # bold pure white — maximum contrast on dark red
PROMPT_COLOR_ERR_MARK="\e[1;38;2;253;246;227m" # Base3 bold — bright warm mark stands out on crimson
PROMPT_COLOR_ROOT_FG="\e[38;2;220;50;47m" # Red — root warning
PROMPT_COLOR_USER_FG="\e[38;2;42;161;152m" # Cyan — normal user
PROMPT_COLOR_DIR_FG="\e[38;2;38;139;210m" # Blue — working directory