diff --git a/AGENTS.md b/AGENTS.md index e2aee0d2..3f86870d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -105,7 +105,7 @@ Exceptions are allowed for migration and package-helper scripts where the helper - `config/` - default configs copied to `~/.config/` - `default/themed/*.tpl` - templates with `{{ variable }}` placeholders for theme colors -- `themes/*/colors.toml` - theme color definitions (accent, background, foreground, red/green/yellow/blue/magenta/cyan and bright_* variants) +- `themes/*/colors.toml` - theme color definitions (accent, bg, fg, red/green/yellow/blue/magenta/cyan and bright_* variants) # Tests diff --git a/bin/omarchy-dev-theme-preview b/bin/omarchy-dev-theme-preview new file mode 100755 index 00000000..324cd69d --- /dev/null +++ b/bin/omarchy-dev-theme-preview @@ -0,0 +1,453 @@ +#!/bin/bash + +# omarchy:summary=Preview an Omarchy theme palette in the terminal +# omarchy:args=[theme-name|theme-dir|colors.toml] [--no-color] [--no-osc|--osc] +# omarchy:examples=omarchy dev theme-preview | omarchy dev theme-preview tokyo-night | omarchy dev theme-preview themes/gruvbox/colors.toml --no-color --no-osc + +set -o pipefail + +CURRENT_THEME_PATH="$HOME/.local/state/omarchy/current/theme" +USER_THEMES_PATH="$HOME/.config/omarchy/themes" +OMARCHY_THEMES_PATH="$OMARCHY_PATH/themes" + +COLOR_OUTPUT=1 +APPLY_OSC="auto" +THEME_REF="" +declare -A COLORS + +usage() { + cat <<'USAGE' +Usage: omarchy-dev-theme-preview [theme-name|theme-dir|colors.toml] [--no-color] [--no-osc] + +Preview a theme palette in the terminal. Without an argument, previews the +current theme from ~/.local/state/omarchy/current/theme/colors.toml. + +When stdout is a terminal and color output is enabled, the preview also applies +that theme's OSC palette to the current terminal only. Use --no-osc to suppress +that, or --osc to force it even when stdout is not detected as a terminal. +USAGE +} + +for arg in "$@"; do + case "$arg" in + --no-color | --plain) + COLOR_OUTPUT=0 + APPLY_OSC="never" + ;; + --no-osc) + APPLY_OSC="never" + ;; + --osc | --apply-osc | --terminal) + APPLY_OSC="always" + ;; + -h | --help) + usage + exit 0 + ;; + *) + if [[ -n $THEME_REF ]]; then + usage >&2 + exit 1 + fi + THEME_REF="$arg" + ;; + esac +done + +if [[ -n ${NO_COLOR:-} ]]; then + COLOR_OUTPUT=0 +fi + +normalize_theme_name() { + printf '%s' "$1" | sed -E 's/<[^>]+>//g' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' +} + +resolve_colors_file() { + local ref="$1" + local theme_name + + if [[ -z $ref ]]; then + printf '%s/colors.toml' "$CURRENT_THEME_PATH" + elif [[ -f $ref ]]; then + printf '%s' "$ref" + elif [[ -d $ref && -f $ref/colors.toml ]]; then + printf '%s/colors.toml' "$ref" + else + theme_name=$(normalize_theme_name "$ref") + if [[ -f $USER_THEMES_PATH/$theme_name/colors.toml ]]; then + printf '%s/colors.toml' "$USER_THEMES_PATH/$theme_name" + elif [[ -f $OMARCHY_THEMES_PATH/$theme_name/colors.toml ]]; then + printf '%s/colors.toml' "$OMARCHY_THEMES_PATH/$theme_name" + else + return 1 + fi + fi +} + +clean_toml_value() { + local value="$1" + + value="${value#*[\"\']}" + value="${value%%[\"\']*}" + printf '%s' "$value" +} + +load_colors() { + local colors_file="$1" + local key value + + while IFS='=' read -r key value; do + key="${key//[\"\' ]/}" + [[ $key && $key != \#* ]] || continue + value=$(clean_toml_value "$value") + COLORS[$key]="$value" + done <"$colors_file" + + # Legacy semantic names win when present so older themes keep their intended + # primary text/background colors even if they also had dimmer fg/bg slots. + [[ ${COLORS[background]} ]] && COLORS[bg]="${COLORS[background]}" + [[ ${COLORS[foreground]} ]] && COLORS[fg]="${COLORS[foreground]}" + [[ ${COLORS[bg]} ]] || COLORS[bg]="${COLORS[color0]}" + [[ ${COLORS[fg]} ]] || COLORS[fg]="${COLORS[color7]}" + [[ ${COLORS[light_fg]} ]] || COLORS[light_fg]="${COLORS[color7]:-${COLORS[fg]}}" + [[ ${COLORS[bright_fg]} ]] || COLORS[bright_fg]="${COLORS[color15]:-${COLORS[fg]}}" + [[ ${COLORS[selection_background]} ]] || COLORS[selection_background]="${COLORS[selection]}" + [[ ${COLORS[selection_foreground]} ]] || COLORS[selection_foreground]="${COLORS[bright_fg]}" + + if hex_valid "${COLORS[bg]}"; then + [[ ${COLORS[dark_bg]} ]] || COLORS[dark_bg]=$(mix_hex "${COLORS[bg]}" "#000000" 1 4) + [[ ${COLORS[darker_bg]} ]] || COLORS[darker_bg]=$(mix_hex "${COLORS[bg]}" "#000000" 1 2) + fi +} + +hex_parts() { + local hex="${1#\#}" + + printf '%d %d %d' "0x${hex:0:2}" "0x${hex:2:2}" "0x${hex:4:2}" +} + +hex_valid() { + [[ $1 =~ ^#[0-9A-Fa-f]{6}$ ]] +} + +luma_sum() { + local r g b + + read -r r g b < <(hex_parts "$1") + printf '%d' $((r * 2126 + g * 7152 + b * 722)) +} + +contrast_ratio() { + local fg="$1" + local bg="$2" + + awk -v fg="${fg#\#}" -v bg="${bg#\#}" ' + function hex_value(char) { return index("0123456789abcdef", tolower(char)) - 1 } + function hex_pair(hex, idx) { return hex_value(substr(hex, idx, 1)) * 16 + hex_value(substr(hex, idx + 1, 1)) } + function channel(hex, idx) { return hex_pair(hex, idx) / 255 } + function linear(c) { return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ^ 2.4 } + function lum(hex) { + return 0.2126 * linear(channel(hex, 1)) + 0.7152 * linear(channel(hex, 3)) + 0.0722 * linear(channel(hex, 5)) + } + BEGIN { + a = lum(fg) + b = lum(bg) + if (a < b) { tmp = a; a = b; b = tmp } + printf "%.2f", (a + 0.05) / (b + 0.05) + } + ' +} + +ansi_bg() { + local r g b + + read -r r g b < <(hex_parts "$1") + printf '\033[48;2;%d;%d;%dm' "$r" "$g" "$b" +} + +ansi_fg() { + local r g b + + read -r r g b < <(hex_parts "$1") + printf '\033[38;2;%d;%d;%dm' "$r" "$g" "$b" +} + +reset_ansi() { + printf '\033[0m' +} + +apply_terminal_osc() { + case "$APPLY_OSC" in + never) + return + ;; + auto) + [[ -t 1 ]] && (( COLOR_OUTPUT )) || return + ;; + always) + ;; + esac + + if [[ -x $OMARCHY_PATH/bin/omarchy-theme-osc ]]; then + "$OMARCHY_PATH/bin/omarchy-theme-osc" "$colors_file" || true + else + omarchy-theme-osc "$colors_file" || true + fi +} + +swatch() { + local hex="$1" + local width="${2:-18}" + local i + + if (( COLOR_OUTPUT )) && hex_valid "$hex"; then + ansi_bg "$hex" + for (( i = 0; i < width; i++ )); do + printf ' ' + done + reset_ansi + else + for (( i = 0; i < width; i++ )); do + printf '#' + done + fi +} + +print_color_row() { + local key="$1" + local hex="${COLORS[$key]}" + + [[ -n $hex ]] || return + printf ' %-22s %-9s ' "$key" "$hex" + swatch "$hex" 20 + printf '\n' +} + +paint_segment() { + local text="$1" + local fg="$2" + local bg="${3:-${COLORS[bg]}}" + + if (( COLOR_OUTPUT )) && hex_valid "$fg" && hex_valid "$bg"; then + ansi_bg "$bg" + ansi_fg "$fg" + printf '%s' "$text" + reset_ansi + else + printf '%s' "$text" + fi +} + +print_group() { + local title="$1" + shift + local key + + printf '\n%s\n' "$title" + for key in "$@"; do + print_color_row "$key" + done +} + +print_selection_sample() { + local bg="${COLORS[bg]}" + local fg="${COLORS[fg]}" + local selection_bg="${COLORS[selection_background]}" + local selection_fg="${COLORS[selection_foreground]}" + + [[ -n $bg && -n $fg && -n $selection_bg && -n $selection_fg ]] || return + + printf '\nSelection sample\n ' + if (( COLOR_OUTPUT )) && hex_valid "$bg" && hex_valid "$fg" && hex_valid "$selection_bg" && hex_valid "$selection_fg"; then + ansi_bg "$bg" + ansi_fg "$fg" + printf ' This is some ' + ansi_bg "$selection_bg" + ansi_fg "$selection_fg" + printf 'selected text' + ansi_bg "$bg" + ansi_fg "$fg" + printf ' in a sentence ' + reset_ansi + printf '\n' + else + printf 'This is some [selected text] in a sentence\n' + fi +} + +print_practical_samples() { + printf '\nTerminal/UI samples\n' + printf ' ' + paint_segment ' normal text ' "${COLORS[fg]}" + paint_segment ' muted/comment ' "${COLORS[muted]}" + paint_segment ' accent/link ' "${COLORS[accent]}" + paint_segment ' error ' "${COLORS[red]}" + paint_segment ' warning ' "${COLORS[yellow]}" + paint_segment ' success ' "${COLORS[green]}" + printf '\n ' + paint_segment ' $ omarchy theme-preview ' "${COLORS[green]}" + paint_segment ' # comment ' "${COLORS[muted]}" + paint_segment ' "string" ' "${COLORS[green]}" + paint_segment ' function() ' "${COLORS[blue]}" + paint_segment ' --flag ' "${COLORS[magenta]}" + printf '\n ' + paint_segment ' unselected menu row ' "${COLORS[fg]}" + printf '\n ' + paint_segment ' selected menu row ' "${COLORS[selection_foreground]}" "${COLORS[selection_background]}" + printf '\n ' + paint_segment ' status/inverse ' "${COLORS[bg]}" "${COLORS[fg]}" + paint_segment ' inactive surface ' "${COLORS[fg]}" "${COLORS[lighter_bg]}" + paint_segment ' urgent ' "${COLORS[bg]}" "${COLORS[red]}" + printf '\n' +} + +print_palette_strip() { + local title="$1" + shift + local key hex + + printf ' %-12s ' "$title" + for key in "$@"; do + hex="${COLORS[$key]}" + if [[ -n $hex ]]; then + swatch "$hex" 4 + printf ' ' + fi + done + printf '\n' +} + +print_ansi_palette() { + printf '\nANSI palette strips\n' + print_palette_strip normal bg red green yellow blue magenta cyan fg + print_palette_strip bright muted bright_red bright_green bright_yellow bright_blue bright_magenta bright_cyan bright_fg +} + +mix_hex() { + local start="$1" + local end="$2" + local index="$3" + local max_index="$4" + local sr sg sb er eg eb r g b + + read -r sr sg sb < <(hex_parts "$start") + read -r er eg eb < <(hex_parts "$end") + + if (( max_index == 0 )); then + printf '%s' "$start" + return + fi + + r=$(((sr * (max_index - index) + er * index + max_index / 2) / max_index)) + g=$(((sg * (max_index - index) + eg * index + max_index / 2) / max_index)) + b=$(((sb * (max_index - index) + eb * index + max_index / 2) / max_index)) + printf '#%02x%02x%02x' "$r" "$g" "$b" +} + +print_gradient() { + local start_key="$1" + local end_key="$2" + local start="${COLORS[$start_key]}" + local end="${COLORS[$end_key]}" + local steps=24 + local i hex + + [[ -n $start && -n $end ]] || return + hex_valid "$start" && hex_valid "$end" || return + + printf '\n%s -> %s gradient\n' "$start_key" "$end_key" + printf ' %s ' "$start" + for (( i = 0; i < steps; i++ )); do + hex=$(mix_hex "$start" "$end" "$i" "$((steps - 1))") + if (( COLOR_OUTPUT )); then + ansi_bg "$hex" + printf ' ' + reset_ansi + else + printf '%s ' "$hex" + fi + done + printf ' %s\n' "$end" +} + +print_neutral_ramp() { + local mode="$1" + local direction sort_flag key hex score entry + local -a keys entries sorted + + keys=(darker_bg dark_bg bg lighter_bg selection muted dark_fg fg light_fg bright_fg) + if [[ $mode == "light" ]]; then + direction="lightest -> darkest" + sort_flag="-rn" + else + direction="darkest -> lightest" + sort_flag="-n" + fi + + for key in "${keys[@]}"; do + hex="${COLORS[$key]}" + [[ -n $hex ]] || continue + hex_valid "$hex" || continue + score=$(luma_sum "$hex") + entries+=("$score $key") + done + + (( ${#entries[@]} > 0 )) || return + + mapfile -t sorted < <(printf '%s\n' "${entries[@]}" | sort "$sort_flag") + + printf '\nNeutral ramp (%s)\n' "$direction" + for entry in "${sorted[@]}"; do + key="${entry#* }" + print_color_row "$key" + done +} + +colors_file=$(resolve_colors_file "$THEME_REF") || { + echo "Theme not found: $THEME_REF" >&2 + exit 1 +} + +if [[ ! -f $colors_file ]]; then + echo "Missing colors.toml: $colors_file" >&2 + exit 1 +fi + +load_colors "$colors_file" + +mode="${COLORS[mode]}" +if [[ -z $mode && ${COLORS[bg]} =~ ^#[0-9A-Fa-f]{6}$ ]]; then + if (( $(luma_sum "${COLORS[bg]}") > 1275000 )); then + mode="light" + else + mode="dark" + fi +fi +[[ -n $mode ]] || mode="dark" + +theme_label="$THEME_REF" +if [[ -z $theme_label ]]; then + if [[ -f $HOME/.local/state/omarchy/current/theme.name ]]; then + theme_label=$(<"$HOME/.local/state/omarchy/current/theme.name") + else + theme_label="current" + fi +fi + +apply_terminal_osc + +printf 'Theme: %s\n' "$theme_label" +printf 'File: %s\n' "$colors_file" +printf 'Mode: %s\n' "$mode" +if [[ ${COLORS[fg]} =~ ^#[0-9A-Fa-f]{6}$ && ${COLORS[bg]} =~ ^#[0-9A-Fa-f]{6}$ ]]; then + printf 'fg/bg contrast: %s:1\n' "$(contrast_ratio "${COLORS[fg]}" "${COLORS[bg]}")" +fi + +print_gradient bg bright_fg +print_neutral_ramp "$mode" +print_group "Foundation" bg fg accent selection +print_selection_sample +print_practical_samples +print_ansi_palette +print_group "Normal colors" red yellow orange green cyan blue magenta brown +print_group "Bright colors" bright_red bright_yellow bright_green bright_cyan bright_blue bright_magenta bright_fg diff --git a/bin/omarchy-plymouth-set-by-theme b/bin/omarchy-plymouth-set-by-theme index 52ae33f7..b2edab11 100755 --- a/bin/omarchy-plymouth-set-by-theme +++ b/bin/omarchy-plymouth-set-by-theme @@ -20,7 +20,38 @@ else theme_dir="$OMARCHY_PATH/themes/$theme" fi -bg=$(awk -F'"' '/^background/{print $2}' "$theme_dir/colors.toml") -text=$(awk -F'"' '/^foreground/{print $2}' "$theme_dir/colors.toml") +theme_color() { + local key="$1" + local fallback="$2" + + awk -F= -v key="$key" -v fallback="$fallback" ' + function clean(raw) { + gsub(/^[[:space:]]+|[[:space:]]+$/, "", raw) + if (raw ~ /^"/) { + sub(/^"/, "", raw) + sub(/".*$/, "", raw) + } + return raw + } + + { + field = $1 + gsub(/^[[:space:]]+|[[:space:]]+$/, "", field) + if (field == key) { + print clean($2) + found = 1 + exit + } + if (field == fallback) fallback_value = clean($2) + } + + END { + if (!found && fallback_value != "") print fallback_value + } + ' "$theme_dir/colors.toml" +} + +bg=$(theme_color background bg) +text=$(theme_color foreground fg) exec omarchy-plymouth-set "$bg" "$text" "$theme_dir/unlock.png" diff --git a/bin/omarchy-theme-colors-from-alacritty b/bin/omarchy-theme-colors-from-alacritty index a740c0ed..ca977585 100755 --- a/bin/omarchy-theme-colors-from-alacritty +++ b/bin/omarchy-theme-colors-from-alacritty @@ -154,13 +154,6 @@ if [[ -z $foreground ]]; then foreground=$(extract_color_in_section "colors" "primary.foreground") fi -# Extract cursor color (from [colors.cursor] section) -cursor=$(extract_color_in_section "colors.cursor" "cursor") - -if [[ -z $cursor ]]; then - cursor=$(extract_color_in_section "colors" "cursor.cursor") -fi - # Extract selection colors selection_background=$(extract_color_in_section "colors.selection" "background") @@ -168,29 +161,22 @@ if [[ -z $selection_background ]]; then selection_background=$(extract_color_in_section "colors" "selection.background") fi -selection_foreground=$(extract_color_in_section "colors.selection" "text") - -if [[ -z $selection_foreground ]]; then - selection_foreground=$(extract_color_in_section "colors" "selection.text") -fi - # Apply defaults background=${background:-$color0} foreground=${foreground:-$color7} -cursor=${cursor:-$foreground} +color0=$background +color7=$foreground selection_background=${selection_background:-$foreground} -selection_foreground=${selection_foreground:-$background} accent=$color4 mkdir -p "$THEME_SOURCE" cat > "$COLORS_OUTPUT" < 382 )) && THEME_COLORS[mode]="light" || THEME_COLORS[mode]="dark" else @@ -407,10 +407,20 @@ if [[ -f $COLORS_FILE ]]; then THEME_COLORS[$key]="$value" done <"$COLORS_FILE" - # Legacy compatibility: map ANSI color0..color15 and raw bg/fg to semantic names + # Canonical palette keys are bg/fg. Preserve older themes that still define + # background/foreground by treating those semantic values as the source of + # truth, then expose the old names as template aliases for user templates. + [[ ${THEME_COLORS[background]} ]] && THEME_COLORS[bg]="${THEME_COLORS[background]}" + [[ ${THEME_COLORS[foreground]} ]] && THEME_COLORS[fg]="${THEME_COLORS[foreground]}" + [[ ${THEME_COLORS[bg]} ]] || THEME_COLORS[bg]="${THEME_COLORS[color0]}" + [[ ${THEME_COLORS[fg]} ]] || THEME_COLORS[fg]="${THEME_COLORS[color7]}" + [[ ${THEME_COLORS[bg]} ]] && THEME_COLORS[background]="${THEME_COLORS[bg]}" + [[ ${THEME_COLORS[fg]} ]] && THEME_COLORS[foreground]="${THEME_COLORS[fg]}" + [[ ${THEME_COLORS[bg]} ]] && THEME_COLORS[color0]="${THEME_COLORS[bg]}" + [[ ${THEME_COLORS[fg]} ]] && THEME_COLORS[color7]="${THEME_COLORS[fg]}" + + # Legacy compatibility: map ANSI color0..color15 to semantic names. declare -A legacy_alias=( - [bg]=background - [fg]=foreground [red]=color1 [green]=color2 [yellow]=color3 @@ -430,18 +440,21 @@ if [[ -f $COLORS_FILE ]]; then alias_theme_color magenta purple alias_theme_color bright_magenta bright_purple - [[ ${THEME_COLORS[light_fg]} ]] || THEME_COLORS[light_fg]="${THEME_COLORS[color7]:-${THEME_COLORS[foreground]}}" - [[ ${THEME_COLORS[bright_fg]} ]] || THEME_COLORS[bright_fg]="${THEME_COLORS[color15]:-${THEME_COLORS[foreground]}}" - [[ ${THEME_COLORS[lighter_bg]} ]] || THEME_COLORS[lighter_bg]="${THEME_COLORS[color0]:-${THEME_COLORS[background]}}" - [[ ${THEME_COLORS[dark_fg]} ]] || THEME_COLORS[dark_fg]="${THEME_COLORS[color8]:-${THEME_COLORS[foreground]}}" + [[ ${THEME_COLORS[light_fg]} ]] || THEME_COLORS[light_fg]="${THEME_COLORS[color7]:-${THEME_COLORS[fg]}}" + [[ ${THEME_COLORS[bright_fg]} ]] || THEME_COLORS[bright_fg]="${THEME_COLORS[color15]:-${THEME_COLORS[fg]}}" + THEME_COLORS[cursor]="${THEME_COLORS[bright_fg]}" + [[ ${THEME_COLORS[lighter_bg]} ]] || THEME_COLORS[lighter_bg]="${THEME_COLORS[color0]:-${THEME_COLORS[bg]}}" + [[ ${THEME_COLORS[dark_fg]} ]] || THEME_COLORS[dark_fg]="${THEME_COLORS[color8]:-${THEME_COLORS[fg]}}" [[ ${THEME_COLORS[muted]} ]] || THEME_COLORS[muted]="${THEME_COLORS[color8]:-${THEME_COLORS[dark_fg]}}" - [[ ${THEME_COLORS[selection]} ]] || THEME_COLORS[selection]="${THEME_COLORS[selection_background]:-${THEME_COLORS[color8]:-${THEME_COLORS[color0]}}}" - [[ ${THEME_COLORS[orange]} ]] || THEME_COLORS[orange]="${THEME_COLORS[yellow]}" + [[ ${THEME_COLORS[selection]} ]] || THEME_COLORS[selection]="${THEME_COLORS[selection_background]:-${THEME_COLORS[color8]:-${THEME_COLORS[color0]:-${THEME_COLORS[bg]}}}}" + [[ ${THEME_COLORS[selection_background]} ]] || THEME_COLORS[selection_background]="${THEME_COLORS[selection]}" + [[ ${THEME_COLORS[selection_foreground]} ]] || THEME_COLORS[selection_foreground]="${THEME_COLORS[bright_fg]}" + [[ ${THEME_COLORS[orange]} ]] || THEME_COLORS[orange]="${THEME_COLORS[yellow]}" [[ ${THEME_COLORS[brown]} ]] || THEME_COLORS[brown]=$(mix_color "${THEME_COLORS[orange]}" "#000000" 50%) # Auto-derive shades from base accents when not defined and not aliased from colorN - [[ ${THEME_COLORS[dark_bg]} ]] || THEME_COLORS[dark_bg]=$(mix_color "${THEME_COLORS[background]}" "#000000" 25%) - [[ ${THEME_COLORS[darker_bg]} ]] || THEME_COLORS[darker_bg]=$(mix_color "${THEME_COLORS[background]}" "#000000" 50%) + [[ ${THEME_COLORS[dark_bg]} ]] || THEME_COLORS[dark_bg]=$(mix_color "${THEME_COLORS[bg]}" "#000000" 25%) + [[ ${THEME_COLORS[darker_bg]} ]] || THEME_COLORS[darker_bg]=$(mix_color "${THEME_COLORS[bg]}" "#000000" 50%) [[ ${THEME_COLORS[bright_red]} ]] || THEME_COLORS[bright_red]=$(mix_color "${THEME_COLORS[red]}" "#ffffff" 20%) [[ ${THEME_COLORS[bright_yellow]} ]] || THEME_COLORS[bright_yellow]=$(mix_color "${THEME_COLORS[yellow]}" "#ffffff" 20%) [[ ${THEME_COLORS[bright_green]} ]] || THEME_COLORS[bright_green]=$(mix_color "${THEME_COLORS[green]}" "#ffffff" 20%) diff --git a/bin/omarchy-theme-set-tmux b/bin/omarchy-theme-set-tmux index ad7aef78..3765a8ca 100755 --- a/bin/omarchy-theme-set-tmux +++ b/bin/omarchy-theme-set-tmux @@ -54,21 +54,31 @@ theme_osc_sequences() { theme_color() { local key="$1" + local fallback="${2:-}" + + awk -F= -v key="$key" -v fallback="$fallback" ' + function clean(raw) { + gsub(/^[[:space:]]+|[[:space:]]+$/, "", raw) + if (raw ~ /^"/) { + sub(/^"/, "", raw) + sub(/".*$/, "", raw) + } + return raw + } - awk -F= -v key="$key" ' { field = $1 gsub(/^[[:space:]]+|[[:space:]]+$/, "", field) if (field == key) { - value = $2 - gsub(/^[[:space:]]+|[[:space:]]+$/, "", value) - if (value ~ /^"/) { - sub(/^"/, "", value) - sub(/".*$/, "", value) - } - print value + print clean($2) + found = 1 exit } + if (fallback != "" && field == fallback) fallback_value = clean($2) + } + + END { + if (!found && fallback_value != "") print fallback_value } ' "$COLORS_TOML" } @@ -78,8 +88,8 @@ sync_tmux_window_style() { [[ -f $COLORS_TOML ]] || return - foreground=$(theme_color foreground) - background=$(theme_color background) + foreground=$(theme_color foreground fg) + background=$(theme_color background bg) [[ -n $foreground && -n $background ]] || return diff --git a/config/omarchy/themed/alacritty.toml.tpl.sample b/config/omarchy/themed/alacritty.toml.tpl.sample index bfb3f0e4..5276dbdd 100644 --- a/config/omarchy/themed/alacritty.toml.tpl.sample +++ b/config/omarchy/themed/alacritty.toml.tpl.sample @@ -15,12 +15,13 @@ # by default. # # AVAILABLE VARIABLES: -# {{ background }} - Main background color (e.g., "#1a1b26") -# {{ foreground }} - Main foreground/text color -# {{ cursor }} - Cursor color +# {{ bg }} - Main background color (e.g., "#1a1b26") +# {{ fg }} - Main foreground/text color +# {{ bright_fg }} - Bright foreground / cursor color # {{ accent }} - Theme accent color -# {{ selection_background }} - Selection highlight background -# {{ selection_foreground }} - Selection highlight foreground +# {{ selection }} - Selection highlight background +# {{ selection_background }} - Selection highlight background alias +# {{ selection_foreground }} - Selection highlight foreground (derived from bright_fg) # # {{ color0 }} through {{ color15 }} - Standard 16-color terminal palette # color0-7: Normal colors (black, red, green, yellow, blue, magenta, cyan, white) @@ -35,35 +36,35 @@ # {{ variable_rgb }} - Decimal RGB values (e.g., "26,27,38") # # Example using modifiers: -# background = "{{ background }}" -> background = "#1a1b26" -# background = "{{ background_strip }}" -> background = "1a1b26" -# background = "rgb({{ background_rgb }})" -> background = "rgb(26,27,38)" +# background = "{{ bg }}" -> background = "#1a1b26" +# background = "{{ bg_strip }}" -> background = "1a1b26" +# background = "rgb({{ bg_rgb }})" -> background = "rgb(26,27,38)" # # --------------------------------------------------------------------------- [colors.primary] -background = "{{ background }}" -foreground = "{{ foreground }}" +background = "{{ bg }}" +foreground = "{{ fg }}" [colors.cursor] -text = "{{ background }}" -cursor = "{{ cursor }}" +text = "{{ bg }}" +cursor = "{{ bright_fg }}" [colors.vi_mode_cursor] -text = "{{ background }}" -cursor = "{{ cursor }}" +text = "{{ bg }}" +cursor = "{{ bright_fg }}" [colors.search.matches] -foreground = "{{ background }}" +foreground = "{{ bg }}" background = "{{ yellow }}" [colors.search.focused_match] -foreground = "{{ background }}" +foreground = "{{ bg }}" background = "{{ red }}" [colors.footer_bar] -foreground = "{{ background }}" -background = "{{ foreground }}" +foreground = "{{ bg }}" +background = "{{ fg }}" [colors.selection] text = "{{ selection_foreground }}" diff --git a/default/themed/alacritty.toml.tpl b/default/themed/alacritty.toml.tpl index ca328bb8..b043aea5 100644 --- a/default/themed/alacritty.toml.tpl +++ b/default/themed/alacritty.toml.tpl @@ -1,26 +1,26 @@ [colors.primary] -background = "{{ background }}" -foreground = "{{ foreground }}" +background = "{{ bg }}" +foreground = "{{ fg }}" [colors.cursor] -text = "{{ background }}" -cursor = "{{ cursor }}" +text = "{{ bg }}" +cursor = "{{ bright_fg }}" [colors.vi_mode_cursor] -text = "{{ background }}" -cursor = "{{ cursor }}" +text = "{{ bg }}" +cursor = "{{ bright_fg }}" [colors.search.matches] -foreground = "{{ background }}" +foreground = "{{ bg }}" background = "{{ yellow }}" [colors.search.focused_match] -foreground = "{{ background }}" +foreground = "{{ bg }}" background = "{{ red }}" [colors.footer_bar] -foreground = "{{ background }}" -background = "{{ foreground }}" +foreground = "{{ bg }}" +background = "{{ fg }}" [colors.selection] text = "{{ selection_foreground }}" diff --git a/default/themed/btop.theme.tpl b/default/themed/btop.theme.tpl index 0a77fd1c..69fa7f77 100644 --- a/default/themed/btop.theme.tpl +++ b/default/themed/btop.theme.tpl @@ -1,11 +1,11 @@ # Main background, empty for terminal default, need to be empty if you want transparent background -theme[main_bg]="{{ background }}" +theme[main_bg]="{{ bg }}" # Main text color -theme[main_fg]="{{ foreground }}" +theme[main_fg]="{{ fg }}" # Title color for boxes -theme[title]="{{ foreground }}" +theme[title]="{{ fg }}" # Highlight color for keyboard shortcuts theme[hi_fg]="{{ accent }}" diff --git a/default/themed/chromium.theme.tpl b/default/themed/chromium.theme.tpl index 84059b28..5b751b83 100644 --- a/default/themed/chromium.theme.tpl +++ b/default/themed/chromium.theme.tpl @@ -1 +1 @@ -{{ background_rgb }} +{{ bg_rgb }} diff --git a/default/themed/foot.ini.tpl b/default/themed/foot.ini.tpl index 9191942e..9a455301 100644 --- a/default/themed/foot.ini.tpl +++ b/default/themed/foot.ini.tpl @@ -1,10 +1,10 @@ [colors-dark] -foreground={{ foreground_strip }} -background={{ background_strip }} +foreground={{ fg_strip }} +background={{ bg_strip }} selection-foreground={{ selection_foreground_strip }} selection-background={{ selection_background_strip }} -cursor={{ background_strip }} {{ cursor_strip }} +cursor={{ bg_strip }} {{ bright_fg_strip }} regular0={{ bg_strip }} regular1={{ red_strip }} diff --git a/default/themed/ghostty.conf.tpl b/default/themed/ghostty.conf.tpl index 6e76b09c..9761d3df 100644 --- a/default/themed/ghostty.conf.tpl +++ b/default/themed/ghostty.conf.tpl @@ -1,6 +1,6 @@ -background = {{ background }} -foreground = {{ foreground }} -cursor-color = {{ cursor }} +background = {{ bg }} +foreground = {{ fg }} +cursor-color = {{ bright_fg }} selection-background = {{ selection_background }} selection-foreground = {{ selection_foreground }} diff --git a/default/themed/gum_env.lua.tpl b/default/themed/gum_env.lua.tpl index 704ec1bb..f48c5720 100644 --- a/default/themed/gum_env.lua.tpl +++ b/default/themed/gum_env.lua.tpl @@ -1,137 +1,137 @@ -- Gum Style (generic) Variables -hl.env("FOREGROUND", "{{ foreground }}") -hl.env("BACKGROUND", "{{ background }}") +hl.env("FOREGROUND", "{{ fg }}") +hl.env("BACKGROUND", "{{ bg }}") hl.env("BORDER_FOREGROUND", "{{ accent }}") -hl.env("BORDER_BACKGROUND", "{{ background }}") +hl.env("BORDER_BACKGROUND", "{{ bg }}") -- Gum Confirm Style Variables hl.env("GUM_CONFIRM_PROMPT_FOREGROUND", "{{ accent }}") -hl.env("GUM_CONFIRM_PROMPT_BACKGROUND", "{{ background }}") +hl.env("GUM_CONFIRM_PROMPT_BACKGROUND", "{{ bg }}") hl.env("GUM_CONFIRM_SELECTED_FOREGROUND", "{{ selection_foreground }}") hl.env("GUM_CONFIRM_SELECTED_BACKGROUND", "{{ selection_background }}") -hl.env("GUM_CONFIRM_UNSELECTED_FOREGROUND", "{{ foreground }}") -hl.env("GUM_CONFIRM_UNSELECTED_BACKGROUND", "{{ background }}") +hl.env("GUM_CONFIRM_UNSELECTED_FOREGROUND", "{{ fg }}") +hl.env("GUM_CONFIRM_UNSELECTED_BACKGROUND", "{{ bg }}") -- Gum Input Style Variables hl.env("GUM_INPUT_PROMPT_FOREGROUND", "{{ accent }}") -hl.env("GUM_INPUT_PROMPT_BACKGROUND", "{{ background }}") +hl.env("GUM_INPUT_PROMPT_BACKGROUND", "{{ bg }}") hl.env("GUM_INPUT_PLACEHOLDER_FOREGROUND", "{{ muted }}") -hl.env("GUM_INPUT_PLACEHOLDER_BACKGROUND", "{{ background }}") -hl.env("GUM_INPUT_CURSOR_FOREGROUND", "{{ cursor }}") -hl.env("GUM_INPUT_CURSOR_BACKGROUND", "{{ background }}") -hl.env("GUM_INPUT_HEADER_FOREGROUND", "{{ foreground }}") -hl.env("GUM_INPUT_HEADER_BACKGROUND", "{{ background }}") +hl.env("GUM_INPUT_PLACEHOLDER_BACKGROUND", "{{ bg }}") +hl.env("GUM_INPUT_CURSOR_FOREGROUND", "{{ bright_fg }}") +hl.env("GUM_INPUT_CURSOR_BACKGROUND", "{{ bg }}") +hl.env("GUM_INPUT_HEADER_FOREGROUND", "{{ fg }}") +hl.env("GUM_INPUT_HEADER_BACKGROUND", "{{ bg }}") -- Gum Choose Style Variables hl.env("GUM_CHOOSE_CURSOR_FOREGROUND", "{{ accent }}") -hl.env("GUM_CHOOSE_CURSOR_BACKGROUND", "{{ background }}") -hl.env("GUM_CHOOSE_HEADER_FOREGROUND", "{{ foreground }}") -hl.env("GUM_CHOOSE_HEADER_BACKGROUND", "{{ background }}") -hl.env("GUM_CHOOSE_ITEM_FOREGROUND", "{{ foreground }}") -hl.env("GUM_CHOOSE_ITEM_BACKGROUND", "{{ background }}") +hl.env("GUM_CHOOSE_CURSOR_BACKGROUND", "{{ bg }}") +hl.env("GUM_CHOOSE_HEADER_FOREGROUND", "{{ fg }}") +hl.env("GUM_CHOOSE_HEADER_BACKGROUND", "{{ bg }}") +hl.env("GUM_CHOOSE_ITEM_FOREGROUND", "{{ fg }}") +hl.env("GUM_CHOOSE_ITEM_BACKGROUND", "{{ bg }}") hl.env("GUM_CHOOSE_SELECTED_FOREGROUND", "{{ selection_foreground }}") hl.env("GUM_CHOOSE_SELECTED_BACKGROUND", "{{ selection_background }}") -- Gum Filter Style Variables hl.env("GUM_FILTER_PROMPT_FOREGROUND", "{{ accent }}") -hl.env("GUM_FILTER_PROMPT_BACKGROUND", "{{ background }}") -hl.env("GUM_FILTER_TEXT_FOREGROUND", "{{ foreground }}") -hl.env("GUM_FILTER_TEXT_BACKGROUND", "{{ background }}") +hl.env("GUM_FILTER_PROMPT_BACKGROUND", "{{ bg }}") +hl.env("GUM_FILTER_TEXT_FOREGROUND", "{{ fg }}") +hl.env("GUM_FILTER_TEXT_BACKGROUND", "{{ bg }}") hl.env("GUM_FILTER_MATCH_FOREGROUND", "{{ accent }}") -hl.env("GUM_FILTER_CURSOR_TEXT_FOREGROUND", "{{ cursor }}") -hl.env("GUM_FILTER_CURSOR_TEXT_BACKGROUND", "{{ background }}") +hl.env("GUM_FILTER_CURSOR_TEXT_FOREGROUND", "{{ bright_fg }}") +hl.env("GUM_FILTER_CURSOR_TEXT_BACKGROUND", "{{ bg }}") hl.env("GUM_FILTER_SELECTED_FOREGROUND", "{{ selection_foreground }}") hl.env("GUM_FILTER_SELECTED_BACKGROUND", "{{ selection_background }}") hl.env("GUM_FILTER_INDICATOR_FOREGROUND", "{{ accent }}") -hl.env("GUM_FILTER_HEADER_FOREGROUND", "{{ foreground }}") -hl.env("GUM_FILTER_MATCH_BACKGROUND", "{{ background }}") -hl.env("GUM_FILTER_HEADER_BACKGROUND", "{{ background }}") +hl.env("GUM_FILTER_HEADER_FOREGROUND", "{{ fg }}") +hl.env("GUM_FILTER_MATCH_BACKGROUND", "{{ bg }}") +hl.env("GUM_FILTER_HEADER_BACKGROUND", "{{ bg }}") hl.env("GUM_FILTER_PLACEHOLDER_FOREGROUND", "{{ muted }}") -hl.env("GUM_FILTER_PLACEHOLDER_BACKGROUND", "{{ background }}") -hl.env("GUM_FILTER_INDICATOR_BACKGROUND", "{{ background }}") +hl.env("GUM_FILTER_PLACEHOLDER_BACKGROUND", "{{ bg }}") +hl.env("GUM_FILTER_INDICATOR_BACKGROUND", "{{ bg }}") hl.env("GUM_FILTER_SELECTED_PREFIX_FOREGROUND", "{{ selection_foreground }}") hl.env("GUM_FILTER_SELECTED_PREFIX_BACKGROUND", "{{ selection_background }}") hl.env("GUM_FILTER_UNSELECTED_PREFIX_FOREGROUND", "{{ muted }}") -hl.env("GUM_FILTER_UNSELECTED_PREFIX_BACKGROUND", "{{ background }}") +hl.env("GUM_FILTER_UNSELECTED_PREFIX_BACKGROUND", "{{ bg }}") -- Gum Table Style Variables -hl.env("GUM_TABLE_HEADER_FOREGROUND", "{{ foreground }}") -hl.env("GUM_TABLE_HEADER_BACKGROUND", "{{ background }}") -hl.env("GUM_TABLE_CELL_FOREGROUND", "{{ foreground }}") -hl.env("GUM_TABLE_CELL_BACKGROUND", "{{ background }}") +hl.env("GUM_TABLE_HEADER_FOREGROUND", "{{ fg }}") +hl.env("GUM_TABLE_HEADER_BACKGROUND", "{{ bg }}") +hl.env("GUM_TABLE_CELL_FOREGROUND", "{{ fg }}") +hl.env("GUM_TABLE_CELL_BACKGROUND", "{{ bg }}") hl.env("GUM_TABLE_BORDER_FOREGROUND", "{{ muted }}") -hl.env("GUM_TABLE_BORDER_BACKGROUND", "{{ background }}") +hl.env("GUM_TABLE_BORDER_BACKGROUND", "{{ bg }}") hl.env("GUM_TABLE_SELECTED_FOREGROUND", "{{ selection_foreground }}") hl.env("GUM_TABLE_SELECTED_BACKGROUND", "{{ selection_background }}") -- Gum Spin Style Variables hl.env("GUM_SPIN_SPINNER_FOREGROUND", "{{ accent }}") -hl.env("GUM_SPIN_SPINNER_BACKGROUND", "{{ background }}") -hl.env("GUM_SPIN_TITLE_FOREGROUND", "{{ foreground }}") -hl.env("GUM_SPIN_TITLE_BACKGROUND", "{{ background }}") +hl.env("GUM_SPIN_SPINNER_BACKGROUND", "{{ bg }}") +hl.env("GUM_SPIN_TITLE_FOREGROUND", "{{ fg }}") +hl.env("GUM_SPIN_TITLE_BACKGROUND", "{{ bg }}") -- Gum File Style Variables -hl.env("GUM_FILE_CURSOR_FOREGROUND", "{{ cursor }}") -hl.env("GUM_FILE_CURSOR_BACKGROUND", "{{ background }}") -hl.env("GUM_FILE_SYMLINK_FOREGROUND", "{{ foreground }}") -hl.env("GUM_FILE_SYMLINK_BACKGROUND", "{{ background }}") -hl.env("GUM_FILE_DIRECTORY_FOREGROUND", "{{ foreground }}") -hl.env("GUM_FILE_DIRECTORY_BACKGROUND", "{{ background }}") -hl.env("GUM_FILE_FILE_FOREGROUND", "{{ foreground }}") -hl.env("GUM_FILE_FILE_BACKGROUND", "{{ background }}") +hl.env("GUM_FILE_CURSOR_FOREGROUND", "{{ bright_fg }}") +hl.env("GUM_FILE_CURSOR_BACKGROUND", "{{ bg }}") +hl.env("GUM_FILE_SYMLINK_FOREGROUND", "{{ fg }}") +hl.env("GUM_FILE_SYMLINK_BACKGROUND", "{{ bg }}") +hl.env("GUM_FILE_DIRECTORY_FOREGROUND", "{{ fg }}") +hl.env("GUM_FILE_DIRECTORY_BACKGROUND", "{{ bg }}") +hl.env("GUM_FILE_FILE_FOREGROUND", "{{ fg }}") +hl.env("GUM_FILE_FILE_BACKGROUND", "{{ bg }}") hl.env("GUM_FILE_PERMISSIONS_FOREGROUND", "{{ muted }}") -hl.env("GUM_FILE_PERMISSIONS_BACKGROUND", "{{ background }}") +hl.env("GUM_FILE_PERMISSIONS_BACKGROUND", "{{ bg }}") hl.env("GUM_FILE_SELECTED_FOREGROUND", "{{ selection_foreground }}") hl.env("GUM_FILE_SELECTED_BACKGROUND", "{{ selection_background }}") hl.env("GUM_FILE_FILE_SIZE_FOREGROUND", "{{ muted }}") -hl.env("GUM_FILE_FILE_SIZE_BACKGROUND", "{{ background }}") -hl.env("GUM_FILE_HEADER_FOREGROUND", "{{ foreground }}") -hl.env("GUM_FILE_HEADER_BACKGROUND", "{{ background }}") +hl.env("GUM_FILE_FILE_SIZE_BACKGROUND", "{{ bg }}") +hl.env("GUM_FILE_HEADER_FOREGROUND", "{{ fg }}") +hl.env("GUM_FILE_HEADER_BACKGROUND", "{{ bg }}") -- Gum Pager Style Variables -hl.env("GUM_PAGER_FOREGROUND", "{{ foreground }}") -hl.env("GUM_PAGER_BACKGROUND", "{{ background }}") +hl.env("GUM_PAGER_FOREGROUND", "{{ fg }}") +hl.env("GUM_PAGER_BACKGROUND", "{{ bg }}") hl.env("GUM_PAGER_LINE_NUMBER_FOREGROUND", "{{ muted }}") -hl.env("GUM_PAGER_LINE_NUMBER_BACKGROUND", "{{ background }}") +hl.env("GUM_PAGER_LINE_NUMBER_BACKGROUND", "{{ bg }}") hl.env("GUM_PAGER_MATCH_FOREGROUND", "{{ accent }}") -hl.env("GUM_PAGER_MATCH_BACKGROUND", "{{ background }}") +hl.env("GUM_PAGER_MATCH_BACKGROUND", "{{ bg }}") hl.env("GUM_PAGER_MATCH_HIGH_FOREGROUND", "{{ accent }}") -hl.env("GUM_PAGER_MATCH_HIGH_BACKGROUND", "{{ background }}") +hl.env("GUM_PAGER_MATCH_HIGH_BACKGROUND", "{{ bg }}") hl.env("GUM_PAGER_HELP_FOREGROUND", "{{ muted }}") -hl.env("GUM_PAGER_HELP_BACKGROUND", "{{ background }}") +hl.env("GUM_PAGER_HELP_BACKGROUND", "{{ bg }}") -- Gum Write Style Variables -hl.env("GUM_WRITE_BASE_FOREGROUND", "{{ foreground }}") -hl.env("GUM_WRITE_BASE_BACKGROUND", "{{ background }}") +hl.env("GUM_WRITE_BASE_FOREGROUND", "{{ fg }}") +hl.env("GUM_WRITE_BASE_BACKGROUND", "{{ bg }}") hl.env("GUM_WRITE_CURSOR_LINE_NUMBER_FOREGROUND", "{{ muted }}") -hl.env("GUM_WRITE_CURSOR_LINE_NUMBER_BACKGROUND", "{{ background }}") -hl.env("GUM_WRITE_CURSOR_LINE_FOREGROUND", "{{ foreground }}") +hl.env("GUM_WRITE_CURSOR_LINE_NUMBER_BACKGROUND", "{{ bg }}") +hl.env("GUM_WRITE_CURSOR_LINE_FOREGROUND", "{{ fg }}") hl.env("GUM_WRITE_CURSOR_LINE_BACKGROUND", "{{ selection_background }}") -hl.env("GUM_WRITE_CURSOR_FOREGROUND", "{{ cursor }}") -hl.env("GUM_WRITE_CURSOR_BACKGROUND", "{{ background }}") +hl.env("GUM_WRITE_CURSOR_FOREGROUND", "{{ bright_fg }}") +hl.env("GUM_WRITE_CURSOR_BACKGROUND", "{{ bg }}") hl.env("GUM_WRITE_END_OF_BUFFER_FOREGROUND", "{{ muted }}") -hl.env("GUM_WRITE_END_OF_BUFFER_BACKGROUND", "{{ background }}") +hl.env("GUM_WRITE_END_OF_BUFFER_BACKGROUND", "{{ bg }}") hl.env("GUM_WRITE_LINE_NUMBER_FOREGROUND", "{{ muted }}") -hl.env("GUM_WRITE_LINE_NUMBER_BACKGROUND", "{{ background }}") -hl.env("GUM_WRITE_HEADER_FOREGROUND", "{{ foreground }}") -hl.env("GUM_WRITE_HEADER_BACKGROUND", "{{ background }}") +hl.env("GUM_WRITE_LINE_NUMBER_BACKGROUND", "{{ bg }}") +hl.env("GUM_WRITE_HEADER_FOREGROUND", "{{ fg }}") +hl.env("GUM_WRITE_HEADER_BACKGROUND", "{{ bg }}") hl.env("GUM_WRITE_PLACEHOLDER_FOREGROUND", "{{ muted }}") -hl.env("GUM_WRITE_PLACEHOLDER_BACKGROUND", "{{ background }}") -hl.env("GUM_WRITE_PROMPT_FOREGROUND", "{{ foreground }}") -hl.env("GUM_WRITE_PROMPT_BACKGROUND", "{{ background }}") +hl.env("GUM_WRITE_PLACEHOLDER_BACKGROUND", "{{ bg }}") +hl.env("GUM_WRITE_PROMPT_FOREGROUND", "{{ fg }}") +hl.env("GUM_WRITE_PROMPT_BACKGROUND", "{{ bg }}") -- Gum Log Style Variables hl.env("GUM_LOG_LEVEL_FOREGROUND", "{{ accent }}") -hl.env("GUM_LOG_LEVEL_BACKGROUND", "{{ background }}") +hl.env("GUM_LOG_LEVEL_BACKGROUND", "{{ bg }}") hl.env("GUM_LOG_TIME_FOREGROUND", "{{ muted }}") -hl.env("GUM_LOG_TIME_BACKGROUND", "{{ background }}") -hl.env("GUM_LOG_PREFIX_FOREGROUND", "{{ foreground }}") -hl.env("GUM_LOG_PREFIX_BACKGROUND", "{{ background }}") -hl.env("GUM_LOG_MESSAGE_FOREGROUND", "{{ foreground }}") -hl.env("GUM_LOG_MESSAGE_BACKGROUND", "{{ background }}") -hl.env("GUM_LOG_KEY_FOREGROUND", "{{ foreground }}") -hl.env("GUM_LOG_KEY_BACKGROUND", "{{ background }}") -hl.env("GUM_LOG_VALUE_FOREGROUND", "{{ foreground }}") -hl.env("GUM_LOG_VALUE_BACKGROUND", "{{ background }}") +hl.env("GUM_LOG_TIME_BACKGROUND", "{{ bg }}") +hl.env("GUM_LOG_PREFIX_FOREGROUND", "{{ fg }}") +hl.env("GUM_LOG_PREFIX_BACKGROUND", "{{ bg }}") +hl.env("GUM_LOG_MESSAGE_FOREGROUND", "{{ fg }}") +hl.env("GUM_LOG_MESSAGE_BACKGROUND", "{{ bg }}") +hl.env("GUM_LOG_KEY_FOREGROUND", "{{ fg }}") +hl.env("GUM_LOG_KEY_BACKGROUND", "{{ bg }}") +hl.env("GUM_LOG_VALUE_FOREGROUND", "{{ fg }}") +hl.env("GUM_LOG_VALUE_BACKGROUND", "{{ bg }}") hl.env("GUM_LOG_SEPARATOR_FOREGROUND", "{{ muted }}") -hl.env("GUM_LOG_SEPARATOR_BACKGROUND", "{{ background }}") +hl.env("GUM_LOG_SEPARATOR_BACKGROUND", "{{ bg }}") diff --git a/default/themed/helix.toml.tpl b/default/themed/helix.toml.tpl index 17fd8695..cf7482d6 100644 --- a/default/themed/helix.toml.tpl +++ b/default/themed/helix.toml.tpl @@ -116,17 +116,17 @@ info = "color4" hint = "color6" [palette] -background = "{{ background }}" -foreground = "{{ foreground }}" -cursor = "{{ cursor }}" +background = "{{ bg }}" +foreground = "{{ fg }}" +cursor = "{{ bright_fg }}" selection_background = "{{ selection_background }}" selection_foreground = "{{ selection_foreground }}" -color0 = "{{ background }}" +color0 = "{{ bg }}" color1 = "{{ red }}" color2 = "{{ green }}" color3 = "{{ yellow }}" color4 = "{{ blue }}" color5 = "{{ magenta }}" color6 = "{{ cyan }}" -color7 = "{{ foreground }}" +color7 = "{{ fg }}" color8 = "{{ muted }}" diff --git a/default/themed/hyprland-preview-share-picker.css.tpl b/default/themed/hyprland-preview-share-picker.css.tpl index f62f8b17..622f6204 100644 --- a/default/themed/hyprland-preview-share-picker.css.tpl +++ b/default/themed/hyprland-preview-share-picker.css.tpl @@ -1,12 +1,12 @@ -@define-color foreground {{ foreground }}; -@define-color background {{ background }}; +@define-color foreground {{ fg }}; +@define-color background {{ bg }}; @define-color accent {{ accent }}; @define-color muted {{ muted }}; @define-color card_bg {{ lighter_bg }}; -@define-color text_dark {{ background }}; +@define-color text_dark {{ bg }}; @define-color accent_hover {{ bright_blue }}; @define-color selected_tab {{ accent }}; -@define-color text {{ foreground }}; +@define-color text {{ fg }}; * { all: unset; diff --git a/default/themed/kitty.conf.tpl b/default/themed/kitty.conf.tpl index 7abecff0..2d8adbf9 100644 --- a/default/themed/kitty.conf.tpl +++ b/default/themed/kitty.conf.tpl @@ -1,10 +1,10 @@ -foreground {{ foreground }} -background {{ background }} +foreground {{ fg }} +background {{ bg }} selection_foreground {{ selection_foreground }} selection_background {{ selection_background }} -cursor {{ cursor }} -cursor_text_color {{ background }} +cursor {{ bright_fg }} +cursor_text_color {{ bg }} active_border_color {{ accent }} active_tab_background {{ accent }} diff --git a/default/themed/neovim.lua.tpl b/default/themed/neovim.lua.tpl index e28534fa..13268b4a 100644 --- a/default/themed/neovim.lua.tpl +++ b/default/themed/neovim.lua.tpl @@ -34,9 +34,9 @@ return { bright_magenta = "{{ bright_magenta }}", accent = "{{ accent }}", - cursor = "{{ cursor }}", - foreground = "{{ foreground }}", - background = "{{ background }}", + cursor = "{{ bright_fg }}", + foreground = "{{ fg }}", + background = "{{ bg }}", selection = "{{ selection }}", selection_foreground = "{{ selection_foreground }}", selection_background = "{{ selection_background }}", diff --git a/default/themed/obsidian.css.tpl b/default/themed/obsidian.css.tpl index e3702d45..9e91b417 100644 --- a/default/themed/obsidian.css.tpl +++ b/default/themed/obsidian.css.tpl @@ -2,11 +2,11 @@ .theme-dark, .theme-light { /* Core colors */ - --background-primary: {{ background }}; - --background-primary-alt: {{ background }}; - --background-secondary: {{ background }}; - --background-secondary-alt: {{ background }}; - --text-normal: {{ foreground }}; + --background-primary: {{ bg }}; + --background-primary-alt: {{ bg }}; + --background-secondary: {{ bg }}; + --background-secondary-alt: {{ bg }}; + --text-normal: {{ fg }}; /* Selection colors */ --text-selection: {{ selection_background }}; @@ -30,8 +30,8 @@ --interactive-accent-hover: {{ accent }}; /* Muted text */ - --text-muted: color-mix(in srgb, {{ foreground }} 70%, transparent); - --text-faint: color-mix(in srgb, {{ foreground }} 55%, transparent); + --text-muted: color-mix(in srgb, {{ fg }} 70%, transparent); + --text-faint: color-mix(in srgb, {{ fg }} 55%, transparent); /* Code */ --code-normal: {{ cyan }}; diff --git a/default/themed/pi.json.tpl b/default/themed/pi.json.tpl index 25e133fd..f6df112a 100644 --- a/default/themed/pi.json.tpl +++ b/default/themed/pi.json.tpl @@ -2,20 +2,20 @@ "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", "name": "omarchy-system", "vars": { - "background": "{{ background }}", - "foreground": "{{ foreground }}", + "background": "{{ bg }}", + "foreground": "{{ fg }}", "accent": "{{ accent }}", "selectionBackground": "{{ selection_background }}", "selectionForeground": "{{ selection_foreground }}", - "selectedBackground": "{{ mix background accent 22% }}", - "color0": "{{ background }}", + "selectedBackground": "{{ mix bg accent 22% }}", + "color0": "{{ bg }}", "color1": "{{ red }}", "color2": "{{ green }}", "color3": "{{ yellow }}", "color4": "{{ blue }}", "color5": "{{ magenta }}", "color6": "{{ cyan }}", - "color7": "{{ foreground }}", + "color7": "{{ fg }}", "color8": "{{ muted }}", "color9": "{{ bright_red }}", "color10": "{{ bright_green }}", @@ -24,15 +24,15 @@ "color13": "{{ bright_magenta }}", "color14": "{{ bright_cyan }}", "color15": "{{ bright_fg }}", - "panel": "{{ mix background foreground 6% }}", - "panelAlt": "{{ mix background foreground 10% }}", - "panelPending": "{{ mix background accent 12% }}", - "panelSuccess": "{{ mix background green 12% }}", - "panelError": "{{ mix background red 12% }}", - "border": "{{ mix background foreground 30% }}", - "borderMuted": "{{ mix background foreground 20% }}", - "mutedText": "{{ mix foreground background 34% }}", - "dimText": "{{ mix foreground background 52% }}" + "panel": "{{ mix bg fg 6% }}", + "panelAlt": "{{ mix bg fg 10% }}", + "panelPending": "{{ mix bg accent 12% }}", + "panelSuccess": "{{ mix bg green 12% }}", + "panelError": "{{ mix bg red 12% }}", + "border": "{{ mix bg fg 30% }}", + "borderMuted": "{{ mix bg fg 20% }}", + "mutedText": "{{ mix fg bg 34% }}", + "dimText": "{{ mix fg bg 52% }}" }, "colors": { "accent": "accent", @@ -88,8 +88,8 @@ "bashMode": "color3" }, "export": { - "pageBg": "{{ background }}", - "cardBg": "{{ mix background foreground 6% }}", - "infoBg": "{{ mix background foreground 10% }}" + "pageBg": "{{ bg }}", + "cardBg": "{{ mix bg fg 6% }}", + "infoBg": "{{ mix bg fg 10% }}" } } diff --git a/default/themed/shell.toml.tpl b/default/themed/shell.toml.tpl index b0a68d8b..4c17f824 100644 --- a/default/themed/shell.toml.tpl +++ b/default/themed/shell.toml.tpl @@ -4,9 +4,9 @@ [bar] # Alpha companions (where present) range from 0 (invisible) to 1 (opaque). -background = "{{ background }}" +background = "{{ bg }}" background-alpha = 1.0 -text = "{{ foreground }}" +text = "{{ fg }}" # Modules calling attention to themselves (recording, voxtype, alerts, updates) active = "{{ red }}" # Cross-axis size at font base-size 12. size-horizontal is the height of @@ -21,7 +21,7 @@ size-vertical = 28 # lock, notifications, popups, and menu-style cards stay aligned with the # current Hyprland active-border gradient. active-border = "{{ shell_gradient hyprland_active_border accent }}" -active-border-foreground = "{{ shell_gradient hyprland_active_border foreground }}" +active-border-foreground = "{{ shell_gradient hyprland_active_border fg }}" [controls] # Shared state tokens for interactive control chrome (buttons, dropdowns, @@ -31,32 +31,32 @@ active-border-foreground = "{{ shell_gradient hyprland_active_border foreground # N, "Y X", "T X B", or "T R B L". Per-side keys like # normal-border-width-left override the list. Each *-border accepts either a # solid color or a Hyprland-style gradient, e.g. "rgba(...) rgba(...) 45deg". -normal-color = "{{ foreground }}" +normal-color = "{{ fg }}" normal-fill-alpha = 0.04 -normal-border = "{{ foreground }}" +normal-border = "{{ fg }}" normal-border-width = 1 normal-border-alpha = 0.4 # Hover-cursor: mouse hover and the panel keyboard cursor. -hover-cursor-color = "{{ foreground }}" +hover-cursor-color = "{{ fg }}" hover-cursor-fill-alpha = 0.08 -hover-cursor-border = "{{ foreground }}" +hover-cursor-border = "{{ fg }}" hover-cursor-border-width = 1 hover-cursor-border-alpha = 0.25 # Focus: Qt activeFocus. Mirror the hover-cursor values by default so # mouse hover, keyboard cursor, and tab focus all read as the same state # — themes that want focus to stand out override these four lines. -focus-color = "{{ foreground }}" +focus-color = "{{ fg }}" focus-fill-alpha = 0.08 -focus-border = "{{ foreground }}" +focus-border = "{{ fg }}" focus-border-width = 1 focus-border-alpha = 0.25 # Selected: persistent chosen/current state. -selected-color = "{{ foreground }}" +selected-color = "{{ fg }}" selected-fill-alpha = 0.18 -selected-border = "{{ foreground }}" +selected-border = "{{ fg }}" selected-border-width = 0 selected-border-alpha = 1.0 @@ -124,9 +124,9 @@ base-size = 12 # Border accepts either a solid color or a Hyprland-style gradient. Border # widths accept one CSS-style scalar/list: N, "Y X", "T X B", or "T R B L"; # individual border-width-top/right/bottom/left keys override the list. -background = "{{ background }}" +background = "{{ bg }}" background-alpha = 1.0 -text = "{{ foreground }}" +text = "{{ fg }}" border = "hyprland.active-border" border-alpha = 1.0 # border-width = 2 @@ -134,16 +134,16 @@ border-alpha = 1.0 [tooltip] # Hover tooltips across the bar, panels, and buttons. background-alpha of # 0.97 mirrors the legacy hard-coded tooltip opacity. -background = "{{ background }}" +background = "{{ bg }}" background-alpha = 0.97 -text = "{{ foreground }}" +text = "{{ fg }}" border = "hyprland.active-border-foreground" border-alpha = 1.0 [notifications] -background = "{{ background }}" +background = "{{ bg }}" background-alpha = 1.0 -text = "{{ foreground }}" +text = "{{ fg }}" # Conventionally matches the Hyprland active-window border. Border accepts # either a solid color or the full active-border gradient. border = "hyprland.active-border" @@ -156,14 +156,14 @@ countdown = "{{ accent }}" # companions go from 0 (invisible) to 1 (opaque). scrim is the full-screen # dim layer behind the card; background is the card itself. Defaults # mirror [menu] with the card at 0.95 to preserve the legacy translucency. -background = "{{ background }}" +background = "{{ bg }}" background-alpha = 0.95 -text = "{{ foreground }}" +text = "{{ fg }}" border = "hyprland.active-border-foreground" border-alpha = 1.0 -scrim = "{{ background }}" +scrim = "{{ bg }}" scrim-alpha = 0.5 -selected-background = "{{ foreground }}" +selected-background = "{{ fg }}" selected-background-alpha = 0.08 selected-text = "{{ accent }}" selected-border = "hyprland.active-border-foreground" @@ -173,14 +173,14 @@ selected-border-alpha = 0.25 # Cards, rows, and selected-row treatment. Alpha companions (where present) # go from 0 (invisible) to 1 (opaque). scrim is the full-screen dim layer # behind the card. Clipboard and emojis inherit these tokens. -background = "{{ background }}" +background = "{{ bg }}" background-alpha = 1.0 -text = "{{ foreground }}" +text = "{{ fg }}" border = "hyprland.active-border-foreground" border-alpha = 1.0 -scrim = "{{ background }}" +scrim = "{{ bg }}" scrim-alpha = 0.5 -selected-background = "{{ foreground }}" +selected-background = "{{ fg }}" selected-background-alpha = 0.08 selected-text = "{{ accent }}" selected-border = "hyprland.active-border-foreground" @@ -192,14 +192,14 @@ selected-border-alpha = 0.25 # text-error tints the lock icon, password text, and placeholder when # authentication fails. border-alpha applies to both border and # border-error (the two states are mutually exclusive in time). -background = "{{ background }}" +background = "{{ bg }}" background-alpha = 1.0 -text = "{{ foreground }}" +text = "{{ fg }}" text-error = "{{ red }}" border = "hyprland.active-border" border-error = "{{ red }}" border-alpha = 1.0 -scrim = "{{ background }}" +scrim = "{{ bg }}" scrim-alpha = 0.5 # accent is the lock-icon glyph color + text-selection tint. accent = "{{ accent }}" @@ -210,10 +210,10 @@ accent = "{{ accent }}" # through idle, typing/authenticating, and wrong-password states. # border-alpha applies to all three border states (they are mutually # exclusive in time). -background = "{{ background }}" +background = "{{ bg }}" background-alpha = 0.8 -text = "{{ foreground }}" -placeholder = "{{ mix foreground background 34% }}" +text = "{{ fg }}" +placeholder = "{{ mix fg bg 34% }}" text-error = "{{ red }}" border = "hyprland.active-border" border-active = "hyprland.active-border" @@ -228,10 +228,10 @@ selection-alpha = 0.45 # the full-screen wash. Per-slice dim overlays and text outlines on top # of the scrim track the foundational background color directly. # unselected-border-alpha softens carousel slices that aren't selected. -scrim = "{{ background }}" +scrim = "{{ bg }}" scrim-alpha = 0.5 -text = "{{ foreground }}" +text = "{{ fg }}" selected-border = "{{ accent }}" selected-border-alpha = 1.0 -unselected-border = "{{ foreground }}" +unselected-border = "{{ fg }}" unselected-border-alpha = 0.28 diff --git a/default/themed/vscode-theme.json.tpl b/default/themed/vscode-theme.json.tpl index 388f83a4..3123d900 100644 --- a/default/themed/vscode-theme.json.tpl +++ b/default/themed/vscode-theme.json.tpl @@ -6,10 +6,10 @@ "semanticTokenColors": { "parameter": "{{ cyan }}", "parameter.declaration": "{{ cyan }}", - "variable": "{{ foreground }}", - "variable.declaration": "{{ foreground }}", + "variable": "{{ fg }}", + "variable.declaration": "{{ fg }}", "variable.readonly": "{{ bright_yellow }}", - "variable.defaultLibrary": "{{ foreground }}", + "variable.defaultLibrary": "{{ fg }}", "property": "{{ cyan }}", "property.declaration": "{{ cyan }}", "property.readonly": "{{ cyan }}", @@ -27,7 +27,7 @@ "enumMember": "{{ orange }}", "type": "{{ yellow }}", "type.declaration": "{{ yellow }}", - "type.defaultLibrary": "{{ foreground }}", + "type.defaultLibrary": "{{ fg }}", "typeParameter": "{{ yellow }}", "namespace": "{{ blue }}", "macro": "{{ cyan }}", @@ -42,14 +42,14 @@ "comment.documentation": {"foreground": "{{ muted }}", "fontStyle": "italic"} }, "colors": { - "foreground": "{{ foreground }}", + "foreground": "{{ fg }}", "disabledForeground": "{{ dark_fg }}", "focusBorder": "{{ accent }}80", "widget.shadow": "{{ bg }}80", "selection.background": "{{ selection_background }}80", "descriptionForeground": "{{ muted }}", "errorForeground": "{{ red }}", - "icon.foreground": "{{ foreground }}", + "icon.foreground": "{{ fg }}", "sash.hoverBorder": "{{ accent }}", "textBlockQuote.background": "{{ bg }}", @@ -65,14 +65,14 @@ "toolbar.activeBackground": "{{ muted }}", "button.background": "{{ accent }}", - "button.foreground": "{{ background }}", + "button.foreground": "{{ bg }}", "button.hoverBackground": "{{ blue }}", - "button.secondaryForeground": "{{ foreground }}", + "button.secondaryForeground": "{{ fg }}", "button.secondaryBackground": "{{ muted }}", "button.secondaryHoverBackground": "{{ bg }}", "button.border": "{{ accent }}20", "checkbox.background": "{{ bg }}", - "checkbox.foreground": "{{ foreground }}", + "checkbox.foreground": "{{ fg }}", "checkbox.border": "{{ muted }}", "checkbox.selectBackground": "{{ accent }}", "checkbox.selectBorder": "{{ accent }}", @@ -80,15 +80,15 @@ "dropdown.background": "{{ bg }}", "dropdown.listBackground": "{{ bg }}", "dropdown.border": "{{ muted }}", - "dropdown.foreground": "{{ foreground }}", + "dropdown.foreground": "{{ fg }}", "input.background": "{{ bg }}", "input.border": "{{ muted }}", - "input.foreground": "{{ foreground }}", + "input.foreground": "{{ fg }}", "input.placeholderForeground": "{{ muted }}", "inputOption.activeBackground": "{{ accent }}40", "inputOption.activeBorder": "{{ accent }}", - "inputOption.activeForeground": "{{ foreground }}", + "inputOption.activeForeground": "{{ fg }}", "inputOption.hoverBackground": "{{ muted }}", "inputValidation.errorBackground": "{{ red }}20", "inputValidation.errorForeground": "{{ red }}", @@ -106,22 +106,22 @@ "scrollbarSlider.hoverBackground": "{{ muted }}80", "badge.background": "{{ accent }}", - "badge.foreground": "{{ background }}", + "badge.foreground": "{{ bg }}", "progressBar.background": "{{ accent }}", "list.activeSelectionBackground": "{{ accent }}30", - "list.activeSelectionForeground": "{{ foreground }}", - "list.activeSelectionIconForeground": "{{ foreground }}", + "list.activeSelectionForeground": "{{ fg }}", + "list.activeSelectionIconForeground": "{{ fg }}", "list.dropBackground": "{{ accent }}20", "list.focusBackground": "{{ accent }}20", - "list.focusForeground": "{{ foreground }}", + "list.focusForeground": "{{ fg }}", "list.focusOutline": "{{ accent }}60", "list.highlightForeground": "{{ accent }}", "list.hoverBackground": "{{ bg }}", - "list.hoverForeground": "{{ foreground }}", + "list.hoverForeground": "{{ fg }}", "list.inactiveSelectionBackground": "{{ muted }}40", - "list.inactiveSelectionForeground": "{{ foreground }}", + "list.inactiveSelectionForeground": "{{ fg }}", "list.inactiveFocusBackground": "{{ muted }}40", "list.inactiveFocusOutline": "{{ muted }}", "list.invalidItemForeground": "{{ red }}", @@ -137,32 +137,32 @@ "tree.tableColumnsBorder": "{{ muted }}", "tree.tableOddRowsBackground": "{{ bg }}40", - "activityBar.background": "{{ background }}", + "activityBar.background": "{{ bg }}", "activityBar.dropBorder": "{{ accent }}", - "activityBar.foreground": "{{ foreground }}", + "activityBar.foreground": "{{ fg }}", "activityBar.inactiveForeground": "{{ muted }}", "activityBar.border": "{{ bg }}", "activityBarBadge.background": "{{ accent }}", - "activityBarBadge.foreground": "{{ background }}", + "activityBarBadge.foreground": "{{ bg }}", "activityBar.activeBorder": "{{ accent }}", "activityBar.activeBackground": "{{ bg }}40", "sideBar.background": "{{ bg }}", - "sideBar.foreground": "{{ foreground }}", + "sideBar.foreground": "{{ fg }}", "sideBar.border": "{{ bg }}", "sideBar.dropBackground": "{{ accent }}20", - "sideBarTitle.foreground": "{{ foreground }}", + "sideBarTitle.foreground": "{{ fg }}", "sideBarSectionHeader.background": "{{ bg }}", - "sideBarSectionHeader.foreground": "{{ foreground }}", + "sideBarSectionHeader.foreground": "{{ fg }}", "sideBarSectionHeader.border": "{{ muted }}40", "minimap.findMatchHighlight": "{{ accent }}80", "minimap.selectionHighlight": "{{ accent }}60", "minimap.errorHighlight": "{{ red }}", "minimap.warningHighlight": "{{ yellow }}", - "minimap.background": "{{ background }}", + "minimap.background": "{{ bg }}", "minimap.selectionOccurrenceHighlight": "{{ accent }}40", - "minimap.foregroundOpacity": "{{ background }}c0", + "minimap.foregroundOpacity": "{{ bg }}c0", "minimapSlider.background": "{{ muted }}20", "minimapSlider.hoverBackground": "{{ muted }}40", "minimapSlider.activeBackground": "{{ muted }}60", @@ -172,17 +172,17 @@ "editorGroup.border": "{{ muted }}40", "editorGroup.dropBackground": "{{ accent }}20", - "editorGroup.dropIntoPromptForeground": "{{ foreground }}", + "editorGroup.dropIntoPromptForeground": "{{ fg }}", "editorGroup.dropIntoPromptBackground": "{{ bg }}", "editorGroup.dropIntoPromptBorder": "{{ accent }}", "editorGroupHeader.noTabsBackground": "{{ bg }}", "editorGroupHeader.tabsBackground": "{{ bg }}", "editorGroupHeader.tabsBorder": "{{ bg }}", "editorGroupHeader.border": "{{ bg }}", - "editorGroup.emptyBackground": "{{ background }}", - "tab.activeBackground": "{{ background }}", - "tab.unfocusedActiveBackground": "{{ background }}", - "tab.activeForeground": "{{ foreground }}", + "editorGroup.emptyBackground": "{{ bg }}", + "tab.activeBackground": "{{ bg }}", + "tab.unfocusedActiveBackground": "{{ bg }}", + "tab.activeForeground": "{{ fg }}", "tab.activeBorder": "{{ accent }}", "tab.activeBorderTop": "{{ accent }}", "tab.unfocusedActiveBorder": "{{ muted }}", @@ -194,22 +194,22 @@ "tab.unfocusedInactiveForeground": "{{ muted }}", "tab.hoverBackground": "{{ muted }}40", "tab.unfocusedHoverBackground": "{{ muted }}40", - "tab.hoverForeground": "{{ foreground }}", + "tab.hoverForeground": "{{ fg }}", "tab.hoverBorder": "{{ accent }}40", "tab.activeModifiedBorder": "{{ yellow }}", "tab.inactiveModifiedBorder": "{{ yellow }}80", "tab.unfocusedActiveModifiedBorder": "{{ yellow }}80", "tab.unfocusedInactiveModifiedBorder": "{{ yellow }}60", "tab.lastPinnedBorder": "{{ muted }}", - "editorPane.background": "{{ background }}", + "editorPane.background": "{{ bg }}", - "editor.background": "{{ background }}", - "editor.foreground": "{{ foreground }}", + "editor.background": "{{ bg }}", + "editor.foreground": "{{ fg }}", "editorLineNumber.foreground": "{{ muted }}", - "editorLineNumber.activeForeground": "{{ foreground }}", + "editorLineNumber.activeForeground": "{{ fg }}", "editorLineNumber.dimmedForeground": "{{ muted }}80", - "editorCursor.background": "{{ background }}", - "editorCursor.foreground": "{{ cursor }}", + "editorCursor.background": "{{ bg }}", + "editorCursor.foreground": "{{ bright_fg }}", "editor.selectionBackground": "{{ selection_background }}60", "editor.selectionForeground": "{{ selection_foreground }}", "editor.inactiveSelectionBackground": "{{ selection_background }}30", @@ -282,7 +282,7 @@ "editorBracketPairGuide.background4": "{{ cyan }}30", "editorBracketPairGuide.background5": "{{ magenta }}30", "editorBracketPairGuide.background6": "{{ orange }}30", - "editorOverviewRuler.background": "{{ background }}", + "editorOverviewRuler.background": "{{ bg }}", "editorOverviewRuler.border": "{{ muted }}20", "editorOverviewRuler.findMatchForeground": "{{ yellow }}80", "editorOverviewRuler.rangeHighlightForeground": "{{ accent }}60", @@ -311,9 +311,9 @@ "problemsErrorIcon.foreground": "{{ red }}", "problemsWarningIcon.foreground": "{{ yellow }}", "problemsInfoIcon.foreground": "{{ blue }}", - "editorUnnecessaryCode.opacity": "{{ background }}80", + "editorUnnecessaryCode.opacity": "{{ bg }}80", "editorUnnecessaryCode.border": "{{ muted }}", - "editorGutter.background": "{{ background }}", + "editorGutter.background": "{{ bg }}", "editorGutter.modifiedBackground": "{{ orange }}", "editorGutter.addedBackground": "{{ green }}", "editorGutter.deletedBackground": "{{ red }}", @@ -343,20 +343,20 @@ "diffEditor.move.border": "{{ cyan }}80", "diffEditor.moveActive.border": "{{ cyan }}", - "editorWidget.foreground": "{{ foreground }}", + "editorWidget.foreground": "{{ fg }}", "editorWidget.background": "{{ bg }}", "editorWidget.border": "{{ muted }}", "editorWidget.resizeBorder": "{{ accent }}", "editorSuggestWidget.background": "{{ bg }}", "editorSuggestWidget.border": "{{ muted }}", - "editorSuggestWidget.foreground": "{{ foreground }}", + "editorSuggestWidget.foreground": "{{ fg }}", "editorSuggestWidget.focusHighlightForeground": "{{ accent }}", "editorSuggestWidget.highlightForeground": "{{ accent }}", "editorSuggestWidget.selectedBackground": "{{ accent }}30", - "editorSuggestWidget.selectedForeground": "{{ foreground }}", - "editorSuggestWidget.selectedIconForeground": "{{ foreground }}", + "editorSuggestWidget.selectedForeground": "{{ fg }}", + "editorSuggestWidget.selectedIconForeground": "{{ fg }}", "editorSuggestWidgetStatus.foreground": "{{ muted }}", - "editorHoverWidget.foreground": "{{ foreground }}", + "editorHoverWidget.foreground": "{{ fg }}", "editorHoverWidget.background": "{{ bg }}", "editorHoverWidget.border": "{{ muted }}", "editorHoverWidget.highlightForeground": "{{ accent }}", @@ -381,15 +381,15 @@ "peekViewEditorGutter.background": "{{ bg }}", "peekViewEditor.matchHighlightBackground": "{{ yellow }}30", "peekViewEditor.matchHighlightBorder": "{{ yellow }}", - "peekViewResult.background": "{{ background }}", - "peekViewResult.fileForeground": "{{ foreground }}", + "peekViewResult.background": "{{ bg }}", + "peekViewResult.fileForeground": "{{ fg }}", "peekViewResult.lineForeground": "{{ muted }}", "peekViewResult.matchHighlightBackground": "{{ yellow }}30", "peekViewResult.selectionBackground": "{{ accent }}30", - "peekViewResult.selectionForeground": "{{ foreground }}", + "peekViewResult.selectionForeground": "{{ fg }}", "peekViewTitle.background": "{{ bg }}", "peekViewTitleDescription.foreground": "{{ muted }}", - "peekViewTitleLabel.foreground": "{{ foreground }}", + "peekViewTitleLabel.foreground": "{{ fg }}", "merge.currentContentBackground": "{{ cyan }}20", "merge.currentHeaderBackground": "{{ cyan }}40", @@ -411,69 +411,69 @@ "mergeEditor.changeBase.background": "{{ muted }}20", "mergeEditor.changeBase.word.background": "{{ muted }}40", - "panel.background": "{{ background }}", + "panel.background": "{{ bg }}", "panel.border": "{{ muted }}40", "panel.dropBorder": "{{ accent }}", "panelTitle.activeBorder": "{{ accent }}", - "panelTitle.activeForeground": "{{ foreground }}", + "panelTitle.activeForeground": "{{ fg }}", "panelTitle.inactiveForeground": "{{ muted }}", "panelInput.border": "{{ muted }}", "panelSection.border": "{{ muted }}40", "panelSection.dropBackground": "{{ accent }}20", "panelSectionHeader.background": "{{ bg }}", - "panelSectionHeader.foreground": "{{ foreground }}", + "panelSectionHeader.foreground": "{{ fg }}", "panelSectionHeader.border": "{{ muted }}40", - "outputView.background": "{{ background }}", + "outputView.background": "{{ bg }}", "outputViewStickyScroll.background": "{{ bg }}", "statusBar.background": "{{ bg }}", - "statusBar.foreground": "{{ foreground }}", + "statusBar.foreground": "{{ fg }}", "statusBar.border": "{{ bg }}", "statusBar.debuggingBackground": "{{ yellow }}", - "statusBar.debuggingForeground": "{{ background }}", + "statusBar.debuggingForeground": "{{ bg }}", "statusBar.debuggingBorder": "{{ yellow }}", "statusBar.noFolderBackground": "{{ bg }}", - "statusBar.noFolderForeground": "{{ foreground }}", + "statusBar.noFolderForeground": "{{ fg }}", "statusBar.noFolderBorder": "{{ bg }}", "statusBar.focusBorder": "{{ accent }}", "statusBarItem.activeBackground": "{{ muted }}", "statusBarItem.hoverBackground": "{{ muted }}60", - "statusBarItem.hoverForeground": "{{ foreground }}", - "statusBarItem.prominentForeground": "{{ foreground }}", + "statusBarItem.hoverForeground": "{{ fg }}", + "statusBarItem.prominentForeground": "{{ fg }}", "statusBarItem.prominentBackground": "{{ accent }}", "statusBarItem.prominentHoverBackground": "{{ accent }}80", "statusBarItem.remoteBackground": "{{ accent }}", - "statusBarItem.remoteForeground": "{{ background }}", + "statusBarItem.remoteForeground": "{{ bg }}", "statusBarItem.remoteHoverBackground": "{{ accent }}80", "statusBarItem.errorBackground": "{{ red }}", - "statusBarItem.errorForeground": "{{ background }}", + "statusBarItem.errorForeground": "{{ bg }}", "statusBarItem.errorHoverBackground": "{{ red }}80", "statusBarItem.warningBackground": "{{ yellow }}", - "statusBarItem.warningForeground": "{{ background }}", + "statusBarItem.warningForeground": "{{ bg }}", "statusBarItem.warningHoverBackground": "{{ yellow }}80", "statusBarItem.compactHoverBackground": "{{ muted }}", "statusBarItem.focusBorder": "{{ accent }}", "titleBar.activeBackground": "{{ bg }}", - "titleBar.activeForeground": "{{ foreground }}", + "titleBar.activeForeground": "{{ fg }}", "titleBar.inactiveBackground": "{{ bg }}", "titleBar.inactiveForeground": "{{ muted }}", "titleBar.border": "{{ bg }}", - "menubar.selectionForeground": "{{ foreground }}", + "menubar.selectionForeground": "{{ fg }}", "menubar.selectionBackground": "{{ accent }}30", "menubar.selectionBorder": "{{ accent }}00", - "menu.foreground": "{{ foreground }}", + "menu.foreground": "{{ fg }}", "menu.background": "{{ bg }}", - "menu.selectionForeground": "{{ foreground }}", + "menu.selectionForeground": "{{ fg }}", "menu.selectionBackground": "{{ accent }}30", "menu.selectionBorder": "{{ accent }}00", "menu.separatorBackground": "{{ muted }}", "menu.border": "{{ muted }}", - "commandCenter.foreground": "{{ foreground }}", - "commandCenter.activeForeground": "{{ foreground }}", + "commandCenter.foreground": "{{ fg }}", + "commandCenter.activeForeground": "{{ fg }}", "commandCenter.background": "{{ bg }}", "commandCenter.activeBackground": "{{ muted }}", "commandCenter.border": "{{ muted }}", @@ -483,10 +483,10 @@ "commandCenter.debuggingBackground": "{{ yellow }}20", "notificationCenter.border": "{{ muted }}", - "notificationCenterHeader.foreground": "{{ foreground }}", + "notificationCenterHeader.foreground": "{{ fg }}", "notificationCenterHeader.background": "{{ bg }}", "notificationToast.border": "{{ muted }}", - "notifications.foreground": "{{ foreground }}", + "notifications.foreground": "{{ fg }}", "notifications.background": "{{ bg }}", "notifications.border": "{{ muted }}", "notificationLink.foreground": "{{ accent }}", @@ -495,18 +495,18 @@ "notificationsInfoIcon.foreground": "{{ blue }}", "banner.background": "{{ accent }}20", - "banner.foreground": "{{ foreground }}", + "banner.foreground": "{{ fg }}", "banner.iconForeground": "{{ accent }}", "extensionButton.prominentBackground": "{{ accent }}", - "extensionButton.prominentForeground": "{{ background }}", + "extensionButton.prominentForeground": "{{ bg }}", "extensionButton.prominentHoverBackground": "{{ accent }}80", "extensionButton.background": "{{ muted }}", - "extensionButton.foreground": "{{ foreground }}", + "extensionButton.foreground": "{{ fg }}", "extensionButton.hoverBackground": "{{ muted }}80", - "extensionButton.separator": "{{ background }}", + "extensionButton.separator": "{{ bg }}", "extensionBadge.remoteBackground": "{{ accent }}", - "extensionBadge.remoteForeground": "{{ background }}", + "extensionBadge.remoteForeground": "{{ bg }}", "extensionIcon.starForeground": "{{ yellow }}", "extensionIcon.verifiedForeground": "{{ cyan }}", "extensionIcon.preReleaseForeground": "{{ yellow }}", @@ -515,21 +515,21 @@ "pickerGroup.border": "{{ muted }}", "pickerGroup.foreground": "{{ accent }}", "quickInput.background": "{{ bg }}", - "quickInput.foreground": "{{ foreground }}", + "quickInput.foreground": "{{ fg }}", "quickInputList.focusBackground": "{{ accent }}30", - "quickInputList.focusForeground": "{{ foreground }}", - "quickInputList.focusIconForeground": "{{ foreground }}", + "quickInputList.focusForeground": "{{ fg }}", + "quickInputList.focusIconForeground": "{{ fg }}", "quickInputTitle.background": "{{ bg }}", "keybindingLabel.background": "{{ muted }}40", - "keybindingLabel.foreground": "{{ foreground }}", + "keybindingLabel.foreground": "{{ fg }}", "keybindingLabel.border": "{{ muted }}", "keybindingLabel.bottomBorder": "{{ muted }}", "keybindingTable.headerBackground": "{{ bg }}", "keybindingTable.rowsBackground": "{{ bg }}40", - "terminal.background": "{{ background }}", - "terminal.foreground": "{{ foreground }}", + "terminal.background": "{{ bg }}", + "terminal.foreground": "{{ fg }}", "terminal.border": "{{ muted }}40", "terminal.selectionBackground": "{{ selection_background }}60", "terminal.selectionForeground": "{{ selection_foreground }}", @@ -539,8 +539,8 @@ "terminal.findMatchHighlightBackground": "{{ yellow }}25", "terminal.findMatchHighlightBorder": "{{ yellow }}60", "terminal.hoverHighlightBackground": "{{ accent }}20", - "terminalCursor.background": "{{ background }}", - "terminalCursor.foreground": "{{ cursor }}", + "terminalCursor.background": "{{ bg }}", + "terminalCursor.foreground": "{{ bright_fg }}", "terminal.ansiBlack": "{{ bg }}", "terminal.ansiRed": "{{ red }}", "terminal.ansiGreen": "{{ green }}", @@ -561,20 +561,20 @@ "terminalCommandDecoration.defaultBackground": "{{ muted }}", "terminalCommandDecoration.successBackground": "{{ green }}", "terminalCommandDecoration.errorBackground": "{{ red }}", - "terminalOverviewRuler.cursorForeground": "{{ cursor }}", + "terminalOverviewRuler.cursorForeground": "{{ bright_fg }}", "terminalOverviewRuler.findMatchForeground": "{{ yellow }}", "terminalStickyScroll.background": "{{ bg }}", "terminalStickyScrollHover.background": "{{ muted }}40", "debugToolBar.background": "{{ bg }}", "debugToolBar.border": "{{ muted }}", - "debugView.stateLabelForeground": "{{ foreground }}", + "debugView.stateLabelForeground": "{{ fg }}", "debugView.stateLabelBackground": "{{ accent }}30", "debugView.valueChangedHighlight": "{{ cyan }}40", - "debugView.exceptionLabelForeground": "{{ background }}", + "debugView.exceptionLabelForeground": "{{ bg }}", "debugView.exceptionLabelBackground": "{{ red }}", "debugTokenExpression.name": "{{ magenta }}", - "debugTokenExpression.value": "{{ foreground }}", + "debugTokenExpression.value": "{{ fg }}", "debugTokenExpression.string": "{{ green }}", "debugTokenExpression.boolean": "{{ orange }}", "debugTokenExpression.number": "{{ orange }}", @@ -594,14 +594,14 @@ "testing.message.info.decorationForeground": "{{ blue }}", "testing.message.info.lineBackground": "{{ blue }}15", - "welcomePage.background": "{{ background }}", + "welcomePage.background": "{{ bg }}", "welcomePage.tileBackground": "{{ bg }}", "welcomePage.tileHoverBackground": "{{ muted }}40", "welcomePage.tileBorder": "{{ muted }}", "welcomePage.progress.background": "{{ muted }}", "welcomePage.progress.foreground": "{{ accent }}", "walkThrough.embeddedEditorBackground": "{{ bg }}", - "walkthrough.stepTitle.foreground": "{{ foreground }}", + "walkthrough.stepTitle.foreground": "{{ fg }}", "gitDecoration.addedResourceForeground": "{{ green }}", "gitDecoration.modifiedResourceForeground": "{{ orange }}", @@ -614,21 +614,21 @@ "gitDecoration.conflictingResourceForeground": "{{ yellow }}", "gitDecoration.submoduleResourceForeground": "{{ magenta }}", - "settings.headerForeground": "{{ foreground }}", + "settings.headerForeground": "{{ fg }}", "settings.modifiedItemIndicator": "{{ accent }}", "settings.dropdownBackground": "{{ bg }}", - "settings.dropdownForeground": "{{ foreground }}", + "settings.dropdownForeground": "{{ fg }}", "settings.dropdownBorder": "{{ muted }}", "settings.dropdownListBorder": "{{ muted }}", "settings.checkboxBackground": "{{ bg }}", - "settings.checkboxForeground": "{{ foreground }}", + "settings.checkboxForeground": "{{ fg }}", "settings.checkboxBorder": "{{ muted }}", "settings.rowHoverBackground": "{{ bg }}", "settings.textInputBackground": "{{ bg }}", - "settings.textInputForeground": "{{ foreground }}", + "settings.textInputForeground": "{{ fg }}", "settings.textInputBorder": "{{ muted }}", "settings.numberInputBackground": "{{ bg }}", - "settings.numberInputForeground": "{{ foreground }}", + "settings.numberInputForeground": "{{ fg }}", "settings.numberInputBorder": "{{ muted }}", "settings.focusedRowBackground": "{{ accent }}10", "settings.focusedRowBorder": "{{ accent }}40", @@ -637,9 +637,9 @@ "settings.settingsHeaderHoverForeground": "{{ accent }}", "breadcrumb.foreground": "{{ muted }}", - "breadcrumb.background": "{{ background }}", - "breadcrumb.focusForeground": "{{ foreground }}", - "breadcrumb.activeSelectionForeground": "{{ foreground }}", + "breadcrumb.background": "{{ bg }}", + "breadcrumb.focusForeground": "{{ fg }}", + "breadcrumb.activeSelectionForeground": "{{ fg }}", "breadcrumbPicker.background": "{{ bg }}", "editor.snippetTabstopHighlightBackground": "{{ accent }}20", @@ -656,9 +656,9 @@ "symbolIcon.enumeratorForeground": "{{ yellow }}", "symbolIcon.enumeratorMemberForeground": "{{ orange }}", "symbolIcon.eventForeground": "{{ yellow }}", - "symbolIcon.fieldForeground": "{{ foreground }}", - "symbolIcon.fileForeground": "{{ foreground }}", - "symbolIcon.folderForeground": "{{ foreground }}", + "symbolIcon.fieldForeground": "{{ fg }}", + "symbolIcon.fileForeground": "{{ fg }}", + "symbolIcon.folderForeground": "{{ fg }}", "symbolIcon.functionForeground": "{{ blue }}", "symbolIcon.interfaceForeground": "{{ yellow }}", "symbolIcon.keyForeground": "{{ bright_magenta }}", @@ -671,12 +671,12 @@ "symbolIcon.objectForeground": "{{ yellow }}", "symbolIcon.operatorForeground": "{{ bright_blue }}", "symbolIcon.packageForeground": "{{ yellow }}", - "symbolIcon.propertyForeground": "{{ foreground }}", + "symbolIcon.propertyForeground": "{{ fg }}", "symbolIcon.referenceForeground": "{{ bright_magenta }}", "symbolIcon.snippetForeground": "{{ green }}", "symbolIcon.stringForeground": "{{ green }}", "symbolIcon.structForeground": "{{ yellow }}", - "symbolIcon.textForeground": "{{ foreground }}", + "symbolIcon.textForeground": "{{ fg }}", "symbolIcon.typeParameterForeground": "{{ yellow }}", "symbolIcon.unitForeground": "{{ orange }}", "symbolIcon.variableForeground": "{{ bright_magenta }}", @@ -699,10 +699,10 @@ "debugConsole.infoForeground": "{{ blue }}", "debugConsole.warningForeground": "{{ yellow }}", "debugConsole.errorForeground": "{{ red }}", - "debugConsole.sourceForeground": "{{ foreground }}", + "debugConsole.sourceForeground": "{{ fg }}", "debugConsoleInputIcon.foreground": "{{ accent }}", - "notebook.editorBackground": "{{ background }}", + "notebook.editorBackground": "{{ bg }}", "notebook.cellBorderColor": "{{ muted }}40", "notebook.cellHoverBackground": "{{ bg }}40", "notebook.cellInsertionIndicator": "{{ accent }}", @@ -724,7 +724,7 @@ "notebookStatusSuccessIcon.foreground": "{{ green }}", "notebookEditorOverviewRuler.runningCellForeground": "{{ accent }}", - "charts.foreground": "{{ foreground }}", + "charts.foreground": "{{ fg }}", "charts.lines": "{{ muted }}", "charts.red": "{{ red }}", "charts.blue": "{{ blue }}", @@ -746,7 +746,7 @@ "inlineChatInput.border": "{{ muted }}", "inlineChatInput.focusBorder": "{{ accent }}", "inlineChatInput.placeholderForeground": "{{ muted }}", - "inlineChatInput.background": "{{ background }}", + "inlineChatInput.background": "{{ bg }}", "inlineChatDiff.inserted": "{{ green }}20", "inlineChatDiff.removed": "{{ red }}20", @@ -766,7 +766,7 @@ "name": "Variable", "scope": ["variable", "string constant.other.placeholder"], "settings": { - "foreground": "{{ foreground }}" + "foreground": "{{ fg }}" } }, { @@ -867,7 +867,7 @@ "name": "Type Builtin", "scope": ["storage.type.primitive", "support.type"], "settings": { - "foreground": "{{ foreground }}" + "foreground": "{{ fg }}" } }, { @@ -1016,7 +1016,7 @@ "name": "Tag Attribute", "scope": ["entity.other.attribute-name"], "settings": { - "foreground": "{{ foreground }}" + "foreground": "{{ fg }}" } }, { @@ -1030,7 +1030,7 @@ "name": "CSS Value", "scope": ["support.constant.property-value.css", "meta.property-value.css"], "settings": { - "foreground": "{{ foreground }}" + "foreground": "{{ fg }}" } }, { @@ -1109,7 +1109,7 @@ "name": "Markdown Bold", "scope": ["markup.bold", "punctuation.definition.bold.markdown"], "settings": { - "foreground": "{{ foreground }}", + "foreground": "{{ fg }}", "fontStyle": "bold" } }, @@ -1117,7 +1117,7 @@ "name": "Markdown Italic", "scope": ["markup.italic", "punctuation.definition.italic.markdown"], "settings": { - "foreground": "{{ foreground }}", + "foreground": "{{ fg }}", "fontStyle": "italic" } }, @@ -1175,7 +1175,7 @@ "name": "This/Self", "scope": ["variable.language.this", "variable.language.self", "variable.language.special.self"], "settings": { - "foreground": "{{ foreground }}", + "foreground": "{{ fg }}", "fontStyle": "italic" } }, @@ -1183,7 +1183,7 @@ "name": "Object Keys", "scope": ["meta.object-literal.key", "string.unquoted.label.js"], "settings": { - "foreground": "{{ foreground }}" + "foreground": "{{ fg }}" } }, { @@ -1205,7 +1205,7 @@ "name": "Shell Variable", "scope": ["variable.other.normal.shell", "variable.other.positional.shell", "variable.other.bracket.shell"], "settings": { - "foreground": "{{ foreground }}" + "foreground": "{{ fg }}" } }, { @@ -1268,7 +1268,7 @@ "name": "Make Variable", "scope": ["variable.other.makefile"], "settings": { - "foreground": "{{ foreground }}" + "foreground": "{{ fg }}" } }, { @@ -1282,7 +1282,7 @@ "name": "Python Self", "scope": ["variable.parameter.function.language.special.self.python"], "settings": { - "foreground": "{{ foreground }}", + "foreground": "{{ fg }}", "fontStyle": "italic" } }, @@ -1298,7 +1298,7 @@ "name": "PHP Variable", "scope": ["variable.other.php", "punctuation.definition.variable.php"], "settings": { - "foreground": "{{ foreground }}" + "foreground": "{{ fg }}" } }, { @@ -1333,7 +1333,7 @@ "name": "GraphQL Field", "scope": ["variable.graphql", "variable.other.graphql"], "settings": { - "foreground": "{{ foreground }}" + "foreground": "{{ fg }}" } } ] diff --git a/default/themed/waybar.css.tpl b/default/themed/waybar.css.tpl index d876a922..27e5ba6a 100644 --- a/default/themed/waybar.css.tpl +++ b/default/themed/waybar.css.tpl @@ -1,2 +1,2 @@ -@define-color foreground {{ foreground }}; -@define-color background {{ background }}; +@define-color foreground {{ fg }}; +@define-color background {{ bg }}; diff --git a/docs/omarchy-shell.md b/docs/omarchy-shell.md index 87c50af4..0885bb26 100644 --- a/docs/omarchy-shell.md +++ b/docs/omarchy-shell.md @@ -143,6 +143,10 @@ sizing in `themes//shell.toml`. Defaults are generated from `default/themed/shell.toml.tpl`; a theme may also drop a hand-written `shell.toml` next to its `colors.toml` to replace the generated file. +`colors.toml` uses `fg` and `bg` for the foundational text/background +palette. The shell exposes those to QML as `Color.foreground` and +`Color.background`, so shell roles still use the readable role names. + The shell exposes these tokens to QML via two singletons in `qs.Commons`: diff --git a/docs/theming.md b/docs/theming.md index aae33b47..ab74c8c9 100644 --- a/docs/theming.md +++ b/docs/theming.md @@ -33,21 +33,33 @@ built-in template, the built-in output is skipped. `colors.toml` provides the palette keys used by templates. Common keys are: ```toml -foreground = "#a9b1d6" -background = "#1a1b26" -accent = "#7aa2f7" -color1 = "#f7768e" -color4 = "#7aa2f7" +bg = "#1a1b26" +fg = "#a9b1d6" +accent = "#7aa2f7" +selection = "#292e42" +red = "#f7768e" +blue = "#7aa2f7" ``` -Any key can be referenced from a template with `{{ key }}`. The shell also -uses a few semantic palette keys directly: +Any key can be referenced from a template with `{{ key }}`. The foundational +shell palette is loaded from: -- `foreground` -- `background` +- `fg` — primary readable text color +- `bg` — primary background color - `accent` — preferred when present; otherwise some places fall back to `color4` -- `urgent` / `color1` +- `urgent` / `red` / `color1` + +For older user themes and templates, `foreground` aliases to `fg` and +`background` aliases to `bg`. + +The neutral ramp is centered on `bg -> bright_fg`. Dark themes should read from +darkest to lightest; light themes should read from lightest to darkest. Terminal +and editor cursors use `bright_fg`; there is no separate cursor palette key. +`selection` is the text-selection background stop in that ramp; Omarchy derives +`selection_background = selection` and `selection_foreground = bright_fg`. Use +`omarchy dev theme-preview [theme]` to inspect that ramp, including `dark_bg`, +`darker_bg`, and a selected-text sample. ## Template placeholders @@ -70,8 +82,8 @@ For a color key such as `accent = "#7aa2f7"`: percentage: ```text -{{ mix background foreground 15% }} -{{ mix_strip background accent 0.35 }} +{{ mix bg fg 15% }} +{{ mix_strip bg accent 0.35 }} {{ mix_rgb color0 color7 50 }} ``` diff --git a/shell/Commons/Color.qml b/shell/Commons/Color.qml index 74d73535..2bc9e977 100644 --- a/shell/Commons/Color.qml +++ b/shell/Commons/Color.qml @@ -4,8 +4,9 @@ import Quickshell import Quickshell.Io import "BorderGeometry.js" as Geometry -// Color surfaces for the shell. Foundational palette (foreground, background, -// accent, urgent) comes from theme/colors.toml. Per-surface roles come from +// Color surfaces for the shell. Foundational palette (fg, bg, accent, +// urgent) comes from theme/colors.toml and is exposed here as +// foreground/background/accent/urgent. Per-surface roles come from // theme/shell.toml — generated per theme from default/themed/shell.toml.tpl, // or shipped directly by a theme to replace the generated file. Surfaces that // don't appear in shell.toml fall back to the foundational palette. @@ -145,22 +146,34 @@ QtObject { var lines = String(raw || "").split("\n") var foundAccent = false var foundMuted = false + var foundForeground = false + var foundBackground = false + var loadedForeground = false + var loadedBackground = false + var color0Value = "" var color4Value = "" + var color7Value = "" var color8Value = "" for (var i = 0; i < lines.length; i++) { var match = lines[i].match(/^\s*([A-Za-z0-9_-]+)\s*=\s*["']?(#[0-9A-Fa-f]{6})/) if (!match) continue - if (match[1] === "foreground") foreground = match[2] - else if (match[1] === "background") background = match[2] + if (match[1] === "foreground") { foreground = match[2]; foundForeground = true; loadedForeground = true } + else if (match[1] === "background") { background = match[2]; foundBackground = true; loadedBackground = true } + else if (match[1] === "fg" && !foundForeground) { foreground = match[2]; loadedForeground = true } + else if (match[1] === "bg" && !foundBackground) { background = match[2]; loadedBackground = true } // Prefer the explicit `accent` key; only fall back to color4 when the // theme doesn't define a separate accent. color4 appears later in the // file so the old single-property approach clobbered accent with it. else if (match[1] === "accent") { accent = match[2]; foundAccent = true } else if (match[1] === "muted") { muted = match[2]; foundMuted = true } + else if (match[1] === "color0") color0Value = match[2] else if (match[1] === "color4") color4Value = match[2] + else if (match[1] === "color7") color7Value = match[2] else if (match[1] === "color8") color8Value = match[2] else if (match[1] === "red" || match[1] === "color1") urgent = match[2] } + if (!loadedBackground && color0Value.length > 0) background = color0Value + if (!loadedForeground && color7Value.length > 0) foreground = color7Value if (!foundAccent && color4Value.length > 0) accent = color4Value if (!foundMuted) muted = color8Value.length > 0 ? color8Value : foreground } diff --git a/test/cli b/test/cli index f91af639..b9268d80 100755 --- a/test/cli +++ b/test/cli @@ -220,11 +220,9 @@ cat >"$NEXT_THEME/colors.toml" <<'EOF' mode = "light" accent = "#336699" hyprland_active_border = "rgba(010203ee) rgba(040506ee) 45deg" -cursor = "#ffffff" -foreground = "#ffffff" -background = "#000000" -selection_foreground = "#000000" -selection_background = "#808080" +bg = "#000000" +fg = "#ffffff" +selection = "#808080" red = "#ff0000" green = "#00ff00" yellow = "#ffff00" @@ -242,9 +240,9 @@ bright_fg = "#eeeeee" EOF cat >"$USER_THEMED/mix-test.txt.tpl" <<'EOF' -mix={{ mix background foreground 50% }} -strip={{ mix_strip background foreground 50% }} -rgb={{ mix_rgb background foreground 50% }} +mix={{ mix bg fg 50% }} +strip={{ mix_strip bg fg 50% }} +rgb={{ mix_rgb bg fg 50% }} EOF cat >"$USER_THEMED/gradient-test.txt.tpl" <<'EOF' @@ -264,6 +262,11 @@ magenta={{ magenta }} legacy-purple={{ purple }} bright-magenta={{ bright_magenta }} legacy-bright-purple={{ bright_purple }} +legacy-background={{ background }} +legacy-foreground={{ foreground }} +selection-background={{ selection_background }} +selection-foreground={{ selection_foreground }} +cursor-alias={{ cursor }} EOF cat >"$NEXT_THEME/shell.lock.toml" <<'EOF' @@ -285,12 +288,36 @@ grep -qx 'magenta=#ff00ff' "$NEXT_THEME/alias-test.txt" || fail "theme template grep -qx 'legacy-purple=#ff00ff' "$NEXT_THEME/alias-test.txt" || fail "theme template purple alias works" grep -qx 'bright-magenta=#ff11ff' "$NEXT_THEME/alias-test.txt" || fail "theme template bright magenta helper works" grep -qx 'legacy-bright-purple=#ff11ff' "$NEXT_THEME/alias-test.txt" || fail "theme template bright purple alias works" +grep -qx 'legacy-background=#000000' "$NEXT_THEME/alias-test.txt" || fail "theme template legacy background alias works" +grep -qx 'legacy-foreground=#ffffff' "$NEXT_THEME/alias-test.txt" || fail "theme template legacy foreground alias works" +grep -qx 'selection-background=#808080' "$NEXT_THEME/alias-test.txt" || fail "theme template derives selection background from selection" +grep -qx 'selection-foreground=#eeeeee' "$NEXT_THEME/alias-test.txt" || fail "theme template derives selection foreground from bright_fg" +grep -qx 'cursor-alias=#eeeeee' "$NEXT_THEME/alias-test.txt" || fail "theme template derives cursor alias from bright_fg" pass "theme template semantic aliases expose legacy colorN helpers" -osc_summary=$("$ROOT/bin/omarchy-theme-osc" "$NEXT_THEME/colors.toml" | python -c 'import sys; data = sys.stdin.buffer.read(); print(data.count(b"]4;"), b"]4;1;#ff0000" in data, b"]4;15;#eeeeee" in data)') -[[ $osc_summary == "16 True True" ]] || fail "theme OSC aliases semantic colors to ANSI palette" +osc_summary=$("$ROOT/bin/omarchy-theme-osc" "$NEXT_THEME/colors.toml" | python -c 'import sys; data = sys.stdin.buffer.read(); print(data.count(b"]4;"), b"]4;1;#ff0000" in data, b"]4;7;#ffffff" in data, b"]4;15;#eeeeee" in data, b"]12;#eeeeee" in data, b"]17;#808080" in data, b"]19;#eeeeee" in data)') +[[ $osc_summary == "16 True True True True True True" ]] || fail "theme OSC aliases semantic colors to ANSI palette" pass "theme OSC aliases semantic colors to ANSI palette" +preview_output=$(OMARCHY_PATH="$ROOT" HOME="$PI_TMPDIR" "$ROOT/bin/omarchy-dev-theme-preview" "$NEXT_THEME/colors.toml" --no-color) +assert_output_contains "theme preview shows bg to bright_fg gradient" "$preview_output" "bg -> bright_fg gradient" +assert_output_contains "theme preview orders light mode ramp light to dark" "$preview_output" "Neutral ramp (lightest -> darkest)" +assert_output_contains "theme preview includes dark background slots" "$preview_output" "darker_bg" +assert_output_contains "theme preview shows selected text sample" "$preview_output" "This is some [selected text] in a sentence" +assert_output_contains "theme preview shows practical terminal samples" "$preview_output" "Terminal/UI samples" +assert_output_contains "theme preview shows ANSI palette strips" "$preview_output" "ANSI palette strips" + +tokyo_fg=$(awk -F'"' '/^fg =/ { print $2; exit }' "$ROOT/themes/tokyo-night/colors.toml") +tokyo_light_fg=$(awk -F'"' '/^light_fg =/ { print $2; exit }' "$ROOT/themes/tokyo-night/colors.toml") +tokyo_bright_fg=$(awk -F'"' '/^bright_fg =/ { print $2; exit }' "$ROOT/themes/tokyo-night/colors.toml") +[[ $tokyo_fg == "#a9b1d6" && $tokyo_light_fg == "#b4bee6" && $tokyo_bright_fg == "#c0caf5" ]] || fail "tokyo night fg ramp stays ordered" +pass "tokyo night fg ramp stays ordered" + +if rg -q '^cursor\s*=' "$ROOT/themes" -g'colors.toml'; then + fail "built-in colors.toml files omit cursor token" +fi +pass "built-in colors.toml files omit cursor token" + grep -qx 'hypr={ colors = { "rgba(010203ee)", "rgba(040506ee)" }, angle = 45 }' "$NEXT_THEME/gradient-test.txt" || fail "theme template hypr_gradient helper works" grep -qx 'shell=#010203' "$NEXT_THEME/gradient-test.txt" || fail "theme template gradient_start helper works" grep -qx 'shell-gradient=rgba(010203ee) rgba(040506ee) 45deg' "$NEXT_THEME/gradient-test.txt" || fail "theme template shell_gradient helper works" diff --git a/themes/catppuccin-latte/colors.toml b/themes/catppuccin-latte/colors.toml index f126fd56..03a94be9 100644 --- a/themes/catppuccin-latte/colors.toml +++ b/themes/catppuccin-latte/colors.toml @@ -1,18 +1,15 @@ mode = "light" accent = "#1e66f5" -cursor = "#dc8a78" -foreground = "#4c4f69" -background = "#eff1f5" -selection_foreground = "#eff1f5" -selection_background = "#dc8a78" bg = "#eff1f5" +dark_bg = "#e3e4e8" +darker_bg = "#d7d8dc" lighter_bg = "#dce0e8" selection = "#ccd0da" muted = "#acb0be" dark_fg = "#9ca0b0" -fg = "#8c8fa1" +fg = "#4c4f69" light_fg = "#5c5f77" bright_fg = "#4c4f69" @@ -24,11 +21,10 @@ cyan = "#179299" blue = "#1e66f5" magenta = "#ea76cb" brown = "#6c2715" -dark_bg = "#e3e4e8" -darker_bg = "#d7d8dc" + bright_red = "#d20f39" bright_yellow = "#df8e1d" bright_green = "#40a02b" bright_cyan = "#179299" bright_blue = "#1e66f5" -bright_magenta = "#ea76cb" \ No newline at end of file +bright_magenta = "#ea76cb" diff --git a/themes/catppuccin/colors.toml b/themes/catppuccin/colors.toml index 54520347..6826435b 100644 --- a/themes/catppuccin/colors.toml +++ b/themes/catppuccin/colors.toml @@ -1,18 +1,15 @@ mode = "dark" accent = "#89b4fa" -cursor = "#f5e0dc" -foreground = "#cdd6f4" -background = "#1e1e2e" -selection_foreground = "#1e1e2e" -selection_background = "#f5e0dc" bg = "#1e1e2e" +dark_bg = "#161622" +darker_bg = "#101019" lighter_bg = "#313244" selection = "#45475a" muted = "#585b70" dark_fg = "#6c7086" -fg = "#9399b2" +fg = "#cdd6f4" light_fg = "#bac2de" bright_fg = "#cdd6f4" @@ -24,11 +21,10 @@ cyan = "#94e2d5" blue = "#89b4fa" magenta = "#f5c2e7" brown = "#7b5b55" -dark_bg = "#161622" -darker_bg = "#101019" + bright_red = "#f38ba8" bright_yellow = "#f9e2af" bright_green = "#a6e3a1" bright_cyan = "#94e2d5" bright_blue = "#89b4fa" -bright_magenta = "#f5c2e7" \ No newline at end of file +bright_magenta = "#f5c2e7" diff --git a/themes/ethereal/colors.toml b/themes/ethereal/colors.toml index e515b85c..1b2f51bb 100644 --- a/themes/ethereal/colors.toml +++ b/themes/ethereal/colors.toml @@ -1,18 +1,15 @@ mode = "dark" accent = "#7d82d9" -cursor = "#ffcead" -foreground = "#ffcead" -background = "#060B1E" -selection_foreground = "#060B1E" -selection_background = "#ffcead" bg = "#060B1E" +dark_bg = "#040816" +darker_bg = "#030610" lighter_bg = "#131a3a" selection = "#252e56" muted = "#3d4573" dark_fg = "#6d7db6" -fg = "#9a96a8" +fg = "#ffcead" light_fg = "#c9b8a6" bright_fg = "#ffcead" @@ -24,11 +21,10 @@ cyan = "#a3bfd1" blue = "#7d82d9" magenta = "#c89dc1" brown = "#75452a" -dark_bg = "#040816" -darker_bg = "#030610" + bright_red = "#faaaa9" bright_yellow = "#f7dc9c" bright_green = "#c4cfc4" bright_cyan = "#dfeaf0" bright_blue = "#c2c4f0" -bright_magenta = "#ead7e7" \ No newline at end of file +bright_magenta = "#ead7e7" diff --git a/themes/everforest/colors.toml b/themes/everforest/colors.toml index 7a5fb444..8879aa8c 100644 --- a/themes/everforest/colors.toml +++ b/themes/everforest/colors.toml @@ -1,18 +1,15 @@ mode = "dark" accent = "#7fbbb3" -cursor = "#d3c6aa" -foreground = "#d3c6aa" -background = "#2d353b" -selection_foreground = "#2d353b" -selection_background = "#d3c6aa" bg = "#2d353b" +dark_bg = "#21272c" +darker_bg = "#181d20" lighter_bg = "#343f44" selection = "#3d484d" muted = "#475258" dark_fg = "#4f585e" -fg = "#7a8478" +fg = "#d3c6aa" light_fg = "#9da9a0" bright_fg = "#d3c6aa" @@ -24,11 +21,10 @@ cyan = "#83c092" blue = "#7fbbb3" magenta = "#d699b6" brown = "#704e3f" -dark_bg = "#21272c" -darker_bg = "#181d20" + bright_red = "#e67e80" bright_yellow = "#dbbc7f" bright_green = "#a7c080" bright_cyan = "#83c092" bright_blue = "#7fbbb3" -bright_magenta = "#d699b6" \ No newline at end of file +bright_magenta = "#d699b6" diff --git a/themes/flexoki-light/colors.toml b/themes/flexoki-light/colors.toml index 192dc824..b5a2a329 100644 --- a/themes/flexoki-light/colors.toml +++ b/themes/flexoki-light/colors.toml @@ -1,18 +1,15 @@ mode = "light" accent = "#205EA6" -cursor = "#100F0F" -foreground = "#100F0F" -background = "#FFFCF0" -selection_foreground = "#100F0F" -selection_background = "#CECDC3" bg = "#FFFCF0" +dark_bg = "#f2efe4" +darker_bg = "#e5e2d8" lighter_bg = "#E6E4D9" selection = "#CECDC3" muted = "#B7B5AC" dark_fg = "#878580" -fg = "#6F6E69" +fg = "#100F0F" light_fg = "#403E3C" bright_fg = "#100F0F" @@ -24,11 +21,10 @@ cyan = "#3AA99F" blue = "#205EA6" magenta = "#CE5D97" brown = "#683b15" -dark_bg = "#f2efe4" -darker_bg = "#e5e2d8" + bright_red = "#D14D41" bright_yellow = "#D0A215" bright_green = "#879A39" bright_cyan = "#3AA99F" bright_blue = "#4385BE" -bright_magenta = "#CE5D97" \ No newline at end of file +bright_magenta = "#CE5D97" diff --git a/themes/gruvbox/colors.toml b/themes/gruvbox/colors.toml index 2b71c62b..a8a37acf 100644 --- a/themes/gruvbox/colors.toml +++ b/themes/gruvbox/colors.toml @@ -1,18 +1,15 @@ mode = "dark" accent = "#7daea3" -cursor = "#bdae93" -foreground = "#d4be98" -background = "#282828" -selection_foreground = "#ebdbb2" -selection_background = "#d65d0e" bg = "#282828" +dark_bg = "#1e1e1e" +darker_bg = "#161616" lighter_bg = "#3c3836" selection = "#504945" muted = "#665c54" dark_fg = "#7c6f64" -fg = "#a89984" +fg = "#d4be98" light_fg = "#bdae93" bright_fg = "#d4be98" @@ -24,11 +21,10 @@ cyan = "#89b482" blue = "#7daea3" magenta = "#d3869b" brown = "#70432e" -dark_bg = "#1e1e1e" -darker_bg = "#161616" + bright_red = "#ea6962" bright_yellow = "#d8a657" bright_green = "#a9b665" bright_cyan = "#89b482" bright_blue = "#7daea3" -bright_magenta = "#d3869b" \ No newline at end of file +bright_magenta = "#d3869b" diff --git a/themes/hackerman/colors.toml b/themes/hackerman/colors.toml index 00b449ed..70152d94 100644 --- a/themes/hackerman/colors.toml +++ b/themes/hackerman/colors.toml @@ -2,18 +2,15 @@ mode = "dark" accent = "#82FB9C" hyprland_active_border = "rgba(26a269ee) rgba(2ec27eee) 45deg" -cursor = "#ddf7ff" -foreground = "#ddf7ff" -background = "#0B0C16" -selection_foreground = "#0B0C16" -selection_background = "#ddf7ff" bg = "#0B0C16" +dark_bg = "#080910" +darker_bg = "#06060c" lighter_bg = "#151828" selection = "#1f253a" muted = "#2d3450" dark_fg = "#6a6e95" -fg = "#8e95b8" +fg = "#ddf7ff" light_fg = "#b5c5db" bright_fg = "#ddf7ff" @@ -25,11 +22,10 @@ cyan = "#7cf8f7" blue = "#829dd4" magenta = "#86a7df" brown = "#287b51" -dark_bg = "#080910" -darker_bg = "#06060c" + bright_red = "#85ff9d" bright_yellow = "#a4ffec" bright_green = "#9cf7c2" bright_cyan = "#d1fffe" bright_blue = "#c4d2ed" -bright_magenta = "#cddbf4" \ No newline at end of file +bright_magenta = "#cddbf4" diff --git a/themes/kanagawa/colors.toml b/themes/kanagawa/colors.toml index bedebb6e..8785be59 100644 --- a/themes/kanagawa/colors.toml +++ b/themes/kanagawa/colors.toml @@ -1,18 +1,15 @@ mode = "dark" accent = "#dcd7ba" -cursor = "#c8c093" -foreground = "#dcd7ba" -background = "#1f1f28" -selection_foreground = "#c8c093" -selection_background = "#2d4f67" bg = "#1f1f28" +dark_bg = "#17171e" +darker_bg = "#111116" lighter_bg = "#223249" selection = "#363646" muted = "#54546D" dark_fg = "#727169" -fg = "#938aa9" +fg = "#dcd7ba" light_fg = "#c8c093" bright_fg = "#dcd7ba" @@ -24,11 +21,10 @@ cyan = "#6a9589" blue = "#7e9cd8" magenta = "#957fb8" brown = "#60382c" -dark_bg = "#17171e" -darker_bg = "#111116" + bright_red = "#e82424" bright_yellow = "#e6c384" bright_green = "#98bb6c" bright_cyan = "#7aa89f" bright_blue = "#7fb4ca" -bright_magenta = "#938aa9" \ No newline at end of file +bright_magenta = "#938aa9" diff --git a/themes/last-horizon/colors.toml b/themes/last-horizon/colors.toml index 1624df40..d456ad23 100644 --- a/themes/last-horizon/colors.toml +++ b/themes/last-horizon/colors.toml @@ -1,26 +1,16 @@ mode = "dark" -# Accent and UI colors accent = "#b59790" hyprland_active_border = "rgba(8a8588ee) rgba(e2dddcee)" hyprland_inactive_border = "rgba(584e51aa)" active_border_color = "#d6d3de" active_tab_background = "#a5a0b6" -# Cursor colors -cursor = "#e2dddc" - -# Primary colors -foreground = "#FAFCFB" -background = "#0c0b0c" - -# Selection colors -selection_foreground = "#0c0b0c" -selection_background = "#FAFCFB" - bg = "#0c0b0c" +dark_bg = "#090809" +darker_bg = "#060606" lighter_bg = "#0c0b0c" -selection = "#FAFCFB" +selection = "#584e51" muted = "#584e51" dark_fg = "#584e51" fg = "#FAFCFB" @@ -33,9 +23,10 @@ green = "#87a9b0" cyan = "#a5a0b6" blue = "#b59790" magenta = "#c4d8e2" + bright_red = "#c38b7b" bright_yellow = "#6B5E73" bright_green = "#87a9b0" bright_cyan = "#a5a0b6" bright_blue = "#b59790" -bright_magenta = "#c4d8e2" \ No newline at end of file +bright_magenta = "#c4d8e2" diff --git a/themes/lumon/colors.toml b/themes/lumon/colors.toml index ed8fe608..dae27e3c 100644 --- a/themes/lumon/colors.toml +++ b/themes/lumon/colors.toml @@ -1,23 +1,17 @@ mode = "dark" -# Accent and UI colors accent = "#8bc9eb" active_border_color = "#f2fcff" active_tab_background = "#6fb8e3" -# Cursor colors -cursor = "#f2fcff" -foreground = "#d6e2ee" -background = "#16242d" -selection_foreground = "#1b2d40" -selection_background = "#4d9ed3" - bg = "#16242d" +dark_bg = "#101b21" +darker_bg = "#0b1216" lighter_bg = "#1b2d40" selection = "#243d56" muted = "#304860" dark_fg = "#4d86b0" -fg = "#6fa4c9" +fg = "#d6e2ee" light_fg = "#d6e2ee" bright_fg = "#f2fcff" @@ -29,11 +23,10 @@ cyan = "#b4e4f6" blue = "#6fb8e3" magenta = "#8bc9eb" brown = "#456475" -dark_bg = "#101b21" -darker_bg = "#0b1216" + bright_red = "#73a6cb" bright_yellow = "#9dcae5" bright_green = "#86b7d8" bright_cyan = "#d1eef8" bright_blue = "#f2fcff" -bright_magenta = "#b1d8ee" \ No newline at end of file +bright_magenta = "#b1d8ee" diff --git a/themes/matte-black/colors.toml b/themes/matte-black/colors.toml index 60c0b543..2b95e7d5 100644 --- a/themes/matte-black/colors.toml +++ b/themes/matte-black/colors.toml @@ -1,18 +1,15 @@ mode = "dark" accent = "#e68e0d" -cursor = "#eaeaea" -foreground = "#bebebe" -background = "#121212" -selection_foreground = "#bebebe" -selection_background = "#515151" bg = "#121212" +dark_bg = "#0d0d0d" +darker_bg = "#090909" lighter_bg = "#1e1e1e" selection = "#2a2a2a" muted = "#333333" dark_fg = "#555555" -fg = "#777777" +fg = "#bebebe" light_fg = "#8a8a8d" bright_fg = "#bebebe" @@ -24,11 +21,10 @@ cyan = "#bebebe" blue = "#e68e0d" magenta = "#D35F5F" brown = "#631e1e" -dark_bg = "#0d0d0d" -darker_bg = "#090909" + bright_red = "#B91C1C" bright_yellow = "#b90a0a" bright_green = "#FFC107" bright_cyan = "#eaeaea" bright_blue = "#f59e0b" -bright_magenta = "#B91C1C" \ No newline at end of file +bright_magenta = "#B91C1C" diff --git a/themes/miasma/colors.toml b/themes/miasma/colors.toml index 131255cd..e6f9ccff 100644 --- a/themes/miasma/colors.toml +++ b/themes/miasma/colors.toml @@ -1,18 +1,15 @@ mode = "dark" accent = "#78824b" -cursor = "#c7c7c7" -foreground = "#c2c2b0" -background = "#222222" -selection_foreground = "#c2c2b0" -selection_background = "#78824b" bg = "#222222" +dark_bg = "#191919" +darker_bg = "#121212" lighter_bg = "#2c2c2c" selection = "#383838" muted = "#444444" dark_fg = "#555555" -fg = "#666666" +fg = "#c2c2b0" light_fg = "#8a8a7e" bright_fg = "#c2c2b0" @@ -24,11 +21,10 @@ cyan = "#c9a554" blue = "#78824b" magenta = "#bb7744" brown = "#463121" -dark_bg = "#191919" -darker_bg = "#121212" + bright_red = "#685742" bright_yellow = "#b36d43" bright_green = "#5f875f" bright_cyan = "#c9a554" bright_blue = "#78824b" -bright_magenta = "#bb7744" \ No newline at end of file +bright_magenta = "#bb7744" diff --git a/themes/nord/colors.toml b/themes/nord/colors.toml index 702766c8..241b2c2f 100644 --- a/themes/nord/colors.toml +++ b/themes/nord/colors.toml @@ -1,18 +1,15 @@ mode = "dark" accent = "#81a1c1" -cursor = "#d8dee9" -foreground = "#d8dee9" -background = "#2e3440" -selection_foreground = "#d8dee9" -selection_background = "#4c566a" bg = "#2e3440" +dark_bg = "#222730" +darker_bg = "#191c23" lighter_bg = "#3b4252" selection = "#434c5e" muted = "#4c566a" dark_fg = "#667080" -fg = "#8690a0" +fg = "#d8dee9" light_fg = "#adb5c4" bright_fg = "#d8dee9" @@ -24,11 +21,10 @@ cyan = "#88c0d0" blue = "#81a1c1" magenta = "#b48ead" brown = "#6a4b3d" -dark_bg = "#222730" -darker_bg = "#191c23" + bright_red = "#bf616a" bright_yellow = "#ebcb8b" bright_green = "#a3be8c" bright_cyan = "#8fbcbb" bright_blue = "#81a1c1" -bright_magenta = "#b48ead" \ No newline at end of file +bright_magenta = "#b48ead" diff --git a/themes/osaka-jade/colors.toml b/themes/osaka-jade/colors.toml index 70dd0c5e..d1f05509 100644 --- a/themes/osaka-jade/colors.toml +++ b/themes/osaka-jade/colors.toml @@ -1,13 +1,10 @@ mode = "dark" accent = "#509475" -cursor = "#D7C995" -foreground = "#C1C497" -background = "#111c18" -selection_foreground = "#111C18" -selection_background = "#C1C497" bg = "#111c18" +dark_bg = "#0c1512" +darker_bg = "#090f0d" lighter_bg = "#23372B" selection = "#32473B" muted = "#53685B" @@ -24,11 +21,10 @@ cyan = "#2DD5B7" blue = "#509475" magenta = "#D2689C" brown = "#513925" -dark_bg = "#0c1512" -darker_bg = "#090f0d" + bright_red = "#db9f9c" bright_yellow = "#E5C736" bright_green = "#63b07a" bright_cyan = "#8CD3CB" bright_blue = "#ACD4CF" -bright_magenta = "#75bbb3" \ No newline at end of file +bright_magenta = "#75bbb3" diff --git a/themes/retro-82/colors.toml b/themes/retro-82/colors.toml index b1e51ef8..511dc677 100644 --- a/themes/retro-82/colors.toml +++ b/themes/retro-82/colors.toml @@ -1,18 +1,15 @@ mode = "dark" accent = "#faa968" -cursor = "#f6dcac" -foreground = "#f6dcac" -background = "#05182e" -selection_foreground = "#00172e" -selection_background = "#faa968" bg = "#05182e" +dark_bg = "#031222" +darker_bg = "#020c17" lighter_bg = "#0a2540" selection = "#134e5a" muted = "#2a6b78" dark_fg = "#3f8f8a" -fg = "#8cbfb8" +fg = "#f6dcac" light_fg = "#a7c9c6" bright_fg = "#f6dcac" @@ -24,11 +21,10 @@ cyan = "#8cbfb8" blue = "#3f8f8a" magenta = "#3f8f8a" brown = "#743d1e" -dark_bg = "#031222" -darker_bg = "#020c17" + bright_red = "#f85525" bright_yellow = "#e97b3c" bright_green = "#028391" bright_cyan = "#8cbfb8" bright_blue = "#faa968" -bright_magenta = "#3f8f8a" \ No newline at end of file +bright_magenta = "#3f8f8a" diff --git a/themes/ristretto/colors.toml b/themes/ristretto/colors.toml index 0ce5cec1..5a69b912 100644 --- a/themes/ristretto/colors.toml +++ b/themes/ristretto/colors.toml @@ -1,18 +1,15 @@ mode = "dark" accent = "#f38d70" -cursor = "#c3b7b8" -foreground = "#e6d9db" -background = "#2c2525" -selection_foreground = "#e6d9db" -selection_background = "#403e41" bg = "#2c2525" +dark_bg = "#211b1b" +darker_bg = "#181414" lighter_bg = "#3d2f2a" selection = "#403e41" muted = "#5b4a45" dark_fg = "#72696a" -fg = "#948a8b" +fg = "#e6d9db" light_fg = "#c3b7b8" bright_fg = "#e6d9db" @@ -24,11 +21,10 @@ cyan = "#85dacc" blue = "#f38d70" magenta = "#a8a9eb" brown = "#7d4d3b" -dark_bg = "#211b1b" -darker_bg = "#181414" + bright_red = "#ff8297" bright_yellow = "#fcd675" bright_green = "#c8e292" bright_cyan = "#9bf1e1" bright_blue = "#f8a788" -bright_magenta = "#bebffd" \ No newline at end of file +bright_magenta = "#bebffd" diff --git a/themes/rose-pine/colors.toml b/themes/rose-pine/colors.toml index 298198b6..ae257c68 100644 --- a/themes/rose-pine/colors.toml +++ b/themes/rose-pine/colors.toml @@ -1,18 +1,15 @@ mode = "light" accent = "#56949f" -cursor = "#cecacd" -foreground = "#575279" -background = "#faf4ed" -selection_foreground = "#575279" -selection_background = "#dfdad9" bg = "#faf4ed" +dark_bg = "#ede7e1" +darker_bg = "#e1dbd5" lighter_bg = "#f2e9e1" selection = "#dfdad9" muted = "#cecacd" dark_fg = "#9893a5" -fg = "#908caa" +fg = "#575279" light_fg = "#6e6a86" bright_fg = "#575279" @@ -24,11 +21,10 @@ cyan = "#d7827e" blue = "#56949f" magenta = "#907aa9" brown = "#67402b" -dark_bg = "#ede7e1" -darker_bg = "#e1dbd5" + bright_red = "#b4637a" bright_yellow = "#ea9d34" bright_green = "#286983" bright_cyan = "#d7827e" bright_blue = "#56949f" -bright_magenta = "#907aa9" \ No newline at end of file +bright_magenta = "#907aa9" diff --git a/themes/solitude/colors.toml b/themes/solitude/colors.toml index 9db3fcf0..2b782ceb 100644 --- a/themes/solitude/colors.toml +++ b/themes/solitude/colors.toml @@ -1,26 +1,16 @@ mode = "dark" -# Accent and UI colors accent = "#798186" hyprland_active_border = "rgba(798186ee) rgba(caccccee)" hyprland_inactive_border = "rgb(1e1e1e)" active_border_color = "#a8adb0" active_tab_background = "#798186" -# Cursor colors -cursor = "#cacccc" - -# Primary colors -foreground = "#cacccc" -background = "#101315" - -# Selection colors -selection_foreground = "#101315" -selection_background = "#798186" - bg = "#101315" +dark_bg = "#0c0e10" +darker_bg = "#080a0b" lighter_bg = "#101315" -selection = "#798186" +selection = "#343d41" muted = "#4b4e55" dark_fg = "#4b4e55" fg = "#cacccc" @@ -33,9 +23,10 @@ green = "#9fa5a9" cyan = "#707070" blue = "#798186" magenta = "#aeaeae" + bright_red = "#de6145" bright_yellow = "#c9c2b4" bright_green = "#343d41" bright_cyan = "#707070" bright_blue = "#5d6367" -bright_magenta = "#9a9a9a" \ No newline at end of file +bright_magenta = "#9a9a9a" diff --git a/themes/tokyo-night/colors.toml b/themes/tokyo-night/colors.toml index 3cad54b5..9b108b22 100644 --- a/themes/tokyo-night/colors.toml +++ b/themes/tokyo-night/colors.toml @@ -1,20 +1,17 @@ mode = "dark" accent = "#7aa2f7" -cursor = "#c0caf5" -foreground = "#a9b1d6" -background = "#1a1b26" -selection_foreground = "#c0caf5" -selection_background = "#7aa2f7" bg = "#1a1b26" +dark_bg = "#13141c" +darker_bg = "#0e0e14" lighter_bg = "#24283b" selection = "#292e42" muted = "#414868" dark_fg = "#565f89" -fg = "#737aa2" -light_fg = "#a9b1d6" -bright_fg = "#cfc9c2" +fg = "#a9b1d6" +light_fg = "#b4bee6" +bright_fg = "#c0caf5" red = "#f7768e" yellow = "#e0af68" @@ -24,8 +21,7 @@ cyan = "#449dab" blue = "#7aa2f7" magenta = "#ad8ee6" brown = "#75493d" -dark_bg = "#13141c" -darker_bg = "#0e0e14" + bright_red = "#ff7a93" bright_yellow = "#ff9e64" bright_green = "#b9f27c" diff --git a/themes/vantablack/colors.toml b/themes/vantablack/colors.toml index ec9c89c8..c57fa9a1 100644 --- a/themes/vantablack/colors.toml +++ b/themes/vantablack/colors.toml @@ -1,17 +1,12 @@ mode = "dark" accent = "#8d8d8d" -cursor = "#ffffff" -foreground = "#ffffff" -background = "#000000" - -# Selection colors -selection_foreground = "#000000" -selection_background = "#ffffff" bg = "#000000" +dark_bg = "#090909" +darker_bg = "#070707" lighter_bg = "#000000" -selection = "#ffffff" +selection = "#1a1a1a" fg = "#ffffff" light_fg = "#ececec" bright_fg = "#ffffff" @@ -24,11 +19,10 @@ cyan = "#b0b0b0" blue = "#8d8d8d" magenta = "#9b9b9b" brown = "#5c5c5c" -dark_bg = "#090909" -darker_bg = "#070707" + bright_red = "#a4a4a4" bright_yellow = "#cecece" bright_green = "#b6b6b6" bright_cyan = "#b0b0b0" bright_blue = "#8d8d8d" -bright_magenta = "#9b9b9b" \ No newline at end of file +bright_magenta = "#9b9b9b" diff --git a/themes/white/colors.toml b/themes/white/colors.toml index 66124cfe..6029b7c6 100644 --- a/themes/white/colors.toml +++ b/themes/white/colors.toml @@ -1,20 +1,12 @@ mode = "light" -# UI Colors (extended) accent = "#6e6e6e" -cursor = "#000000" - -# Primary colors -foreground = "#000000" -background = "#ffffff" - -# Selection colors -selection_foreground = "#ffffff" -selection_background = "#1a1a1a" bg = "#ffffff" +dark_bg = "#bfbfbf" +darker_bg = "#808080" lighter_bg = "#c0c0c0" -selection = "#1a1a1a" +selection = "#c0c0c0" muted = "#c0c0c0" dark_fg = "#c0c0c0" fg = "#000000" @@ -27,9 +19,10 @@ green = "#3a3a3a" cyan = "#3e3e3e" blue = "#1a1a1a" magenta = "#2e2e2e" + bright_red = "#2a2a2a" bright_yellow = "#4a4a4a" bright_green = "#3a3a3a" bright_cyan = "#3e3e3e" bright_blue = "#1a1a1a" -bright_magenta = "#2e2e2e" \ No newline at end of file +bright_magenta = "#2e2e2e"