consistent styling
This commit is contained in:
Symlink
+1
@@ -0,0 +1 @@
|
||||
themes/catppuccin-mocha
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Scaffold a new theme directory (basic/.config/themes/scripts/new-theme.sh).
|
||||
#
|
||||
# Usage: new-theme.sh <theme-id> e.g. new-theme.sh rose-pine-moon
|
||||
#
|
||||
# Copies themes/catppuccin-mocha as a template. Afterwards:
|
||||
# 1. Replace every palette value in the new directory.
|
||||
# 2. Add one row to themes/registry.conf.
|
||||
# 3. Run scripts/switch-theme.sh <theme-id> to try it.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." && pwd)"
|
||||
THEMES_DIR="$REPO_ROOT/basic/.config/themes/themes"
|
||||
|
||||
[[ $# -eq 1 ]] || { echo "usage: $(basename "$0") <theme-id>" >&2; exit 1; }
|
||||
theme_id="$1"
|
||||
if [[ ! "$theme_id" =~ ^[a-z0-9][a-z0-9-]*$ ]]; then
|
||||
echo "error: invalid theme-id '$theme_id'" >&2
|
||||
exit 1
|
||||
fi
|
||||
[[ -e "$THEMES_DIR/$theme_id" ]] && { echo "error: $theme_id already exists" >&2; exit 1; }
|
||||
|
||||
cp -r "$THEMES_DIR/catppuccin-mocha" "$THEMES_DIR/$theme_id"
|
||||
echo "scaffolded $THEMES_DIR/$theme_id"
|
||||
echo "next: replace the palette values, add a registry.conf row, run switch-theme.sh $theme_id"
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
# Central theme switcher (basic/.config/themes/scripts/switch-theme.sh).
|
||||
#
|
||||
# Usage: switch-theme.sh <theme-id> e.g. switch-theme.sh catppuccin-mocha
|
||||
#
|
||||
# Retargets the tracked `current` symlink to themes/<theme-id> and reloads
|
||||
# every consumer that can be reloaded. Because `current` lives in the repo,
|
||||
# the switch is a reviewable git change; re-stowing is not required since
|
||||
# all consumers resolve through ~/.config/themes/current at runtime.
|
||||
#
|
||||
# A future non-Catppuccin theme only needs its own themes/<theme-id>/
|
||||
# directory plus a row in themes/registry.conf — this script stays untouched.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename "$0") <theme-id>" >&2
|
||||
echo "available:" >&2
|
||||
ls -1 "$(repo_root)/basic/.config/themes/themes" 2>/dev/null | grep -v '^registry.conf$' | sed 's/^/ /' >&2 || true
|
||||
}
|
||||
|
||||
repo_root() {
|
||||
local src="$0"
|
||||
if command -v readlink >/dev/null 2>&1; then
|
||||
src="$(readlink -f "$0")"
|
||||
fi
|
||||
cd "$(dirname "$src")/../../../.." && pwd
|
||||
}
|
||||
|
||||
main() {
|
||||
[[ $# -eq 1 ]] || { usage; exit 1; }
|
||||
local theme_id="$1"
|
||||
if [[ ! "$theme_id" =~ ^[a-z0-9][a-z0-9-]*$ ]]; then
|
||||
echo "error: invalid theme-id '$theme_id'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local root
|
||||
root="$(repo_root)"
|
||||
local dest="$root/basic/.config/themes/themes/$theme_id"
|
||||
local link="$root/basic/.config/themes/current"
|
||||
|
||||
[[ -d "$dest" ]] || { echo "error: unknown theme '$theme_id' (no $dest)" >&2; usage; exit 1; }
|
||||
|
||||
ln -sfn "themes/$theme_id" "$link"
|
||||
echo "theme switched: current -> themes/$theme_id"
|
||||
|
||||
# Best-effort live reloads; every step is guarded so the switch
|
||||
# succeeds even on machines without a running compositor.
|
||||
if command -v hyprctl >/dev/null 2>&1; then
|
||||
hyprctl reload >/dev/null 2>&1 || true
|
||||
fi
|
||||
if command -v tmux >/dev/null 2>&1 && [[ -n "${TMUX:-}" ]]; then
|
||||
tmux source-file "$HOME/.config/tmux/tmux.conf" >/dev/null 2>&1 || true
|
||||
fi
|
||||
if pgrep -x waybar >/dev/null 2>&1; then
|
||||
pkill -x waybar >/dev/null 2>&1 || true
|
||||
(waybar >/dev/null 2>&1 &) || true
|
||||
fi
|
||||
echo "note: restart Neovim (or :colorscheme \$THEME_NVIM_COLORSCHEME) and open a new shell to pick up theme.env.sh."
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Executable
+83
@@ -0,0 +1,83 @@
|
||||
#!/bin/bash
|
||||
# Central theme drift guard (basic/.config/themes/scripts/sync-theme.sh).
|
||||
#
|
||||
# Fails if hardcoded theme hex values appear anywhere in the repo outside:
|
||||
# - basic/.config/themes (the single source of truth)
|
||||
# - term/.config/tmux/plugins/ (vendored upstream, stow-ignored)
|
||||
# - term/.config/yazi/theme.toml (declared mirror: yazi has no include)
|
||||
# - term/.config/starship.toml (declared mirror: starship has no include)
|
||||
# - hypr/.config/rofi/themes/ltmnight.rasi (declared mirror: rasi has no
|
||||
# alpha() function, so the two translucency values are #RRGGBBAA hex;
|
||||
# everything else maps onto the central theme via @import)
|
||||
# - test/ + docs (may quote values in prose)
|
||||
#
|
||||
# Run with: bash basic/.config/themes/scripts/sync-theme.sh
|
||||
# test/lint.sh invokes it as part of `make test-lint`.
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." && pwd)"
|
||||
cd "$REPO_ROOT" || exit 1
|
||||
|
||||
# Sentinel hex values of the active palette (case-insensitive).
|
||||
SENTINELS='74c7ec|1e1e2e|cdd6f4|45475a|b4befe|f38ba8|a6e3a1|f9e2af|181825|11111b|89b4fa|f5e0dc'
|
||||
|
||||
matches="$(grep -rniE --include='*.conf' --include='*.css' --include='*.rasi' \
|
||||
--include='*.lua' --include='*.toml' --include='*.fish' --include='*.sh' \
|
||||
--exclude-dir='.git' --exclude-dir='plugins' --exclude-dir='test' \
|
||||
-E "$SENTINELS" . 2>/dev/null | grep -vE '^./basic/.config/themes' \
|
||||
| grep -vE 'term/.config/(yazi/theme.toml|starship.toml)' \
|
||||
| grep -vE 'hypr/.config/rofi/themes/ltmnight.rasi' || true)"
|
||||
|
||||
if [[ -n "$matches" ]]; then
|
||||
echo "FAIL: hardcoded theme colors outside basic/.config/themes (and declared mirrors):"
|
||||
printf '%s\n' "$matches" | sed 's/^/ /'
|
||||
echo "Move the values into basic/.config/themes and reference them instead."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "ok: no hardcoded theme colors outside the central theme"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Role/palette consistency: every role in theme.css must equal its palette
|
||||
# twin (roles are literal hex because some parsers drop @-references).
|
||||
# ---------------------------------------------------------------------------
|
||||
python3 - <<'EOF'
|
||||
import re, sys
|
||||
|
||||
css_path = "basic/.config/themes/themes/catppuccin-mocha/theme.css"
|
||||
defines = dict(re.findall(r"@define-color\s+([a-z0-9_]+)\s+(#[0-9a-fA-F]+)", open(css_path).read()))
|
||||
|
||||
# role -> palette twin (bg_translucent intentionally excluded: crust + alpha).
|
||||
pairs = {
|
||||
"bg": "base", "bg_dim": "mantle", "bg_deep": "crust",
|
||||
"fg": "text", "fg_dim": "subtext0", "fg_muted": "overlay1",
|
||||
"surface": "surface0", "border": "surface1",
|
||||
"accent": "sapphire", "accent2": "lavender",
|
||||
"ok": "green", "warn": "yellow", "urgent": "red",
|
||||
}
|
||||
|
||||
missing = [k for k in list(pairs) + list(pairs.values()) if k not in defines]
|
||||
if missing:
|
||||
print(f"FAIL: theme.css missing defines: {sorted(missing)}")
|
||||
sys.exit(1)
|
||||
|
||||
bad = [r for r, p in pairs.items() if defines[r].lower() != defines[p].lower()]
|
||||
if bad:
|
||||
print(f"FAIL: roles out of sync with palette in {css_path}: {bad}")
|
||||
sys.exit(1)
|
||||
|
||||
trans = defines.get("bg_translucent_raw", "")
|
||||
m = re.fullmatch(r"rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([0-9.]+)\s*\)", trans)
|
||||
if not m:
|
||||
# defines[] regex only captures #hex; re-read raw value (may be rgba()).
|
||||
raw = re.search(r"@define-color\s+bg_translucent\s+([^;]+);", open(css_path).read())
|
||||
trans = raw.group(1).strip() if raw else ""
|
||||
m = re.fullmatch(r"rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([0-9.]+)\s*\)", trans)
|
||||
crust_rgb = tuple(int(defines["crust"][i:i+2], 16) for i in (1, 3, 5))
|
||||
if not m or tuple(map(int, m.groups()[:3])) != crust_rgb or not (0 < float(m.group(4)) < 1):
|
||||
print(f"FAIL: bg_translucent must be rgba(crust, alpha<1) in {css_path}")
|
||||
sys.exit(1)
|
||||
|
||||
print("ok: theme.css roles match palette")
|
||||
EOF
|
||||
@@ -0,0 +1,83 @@
|
||||
# Central theme: catppuccin-mocha (Catppuccin Mocha), hyprland $vars.
|
||||
# Part of basic/.config/themes. Managed file: refresh via
|
||||
# basic/scripts/fetch-ports.sh
|
||||
# (upstream: catppuccin/hyprland generated mocha.conf).
|
||||
# Hyprland consumers load it via: source = ~/.config/themes/current/hypr.conf
|
||||
|
||||
$rosewater = rgb(f5e0dc)
|
||||
$rosewaterAlpha = f5e0dc
|
||||
|
||||
$flamingo = rgb(f2cdcd)
|
||||
$flamingoAlpha = f2cdcd
|
||||
|
||||
$pink = rgb(f5c2e7)
|
||||
$pinkAlpha = f5c2e7
|
||||
|
||||
$mauve = rgb(cba6f7)
|
||||
$mauveAlpha = cba6f7
|
||||
|
||||
$red = rgb(f38ba8)
|
||||
$redAlpha = f38ba8
|
||||
|
||||
$maroon = rgb(eba0ac)
|
||||
$maroonAlpha = eba0ac
|
||||
|
||||
$peach = rgb(fab387)
|
||||
$peachAlpha = fab387
|
||||
|
||||
$yellow = rgb(f9e2af)
|
||||
$yellowAlpha = f9e2af
|
||||
|
||||
$green = rgb(a6e3a1)
|
||||
$greenAlpha = a6e3a1
|
||||
|
||||
$teal = rgb(94e2d5)
|
||||
$tealAlpha = 94e2d5
|
||||
|
||||
$sky = rgb(89dceb)
|
||||
$skyAlpha = 89dceb
|
||||
|
||||
$sapphire = rgb(74c7ec)
|
||||
$sapphireAlpha = 74c7ec
|
||||
|
||||
$blue = rgb(89b4fa)
|
||||
$blueAlpha = 89b4fa
|
||||
|
||||
$lavender = rgb(b4befe)
|
||||
$lavenderAlpha = b4befe
|
||||
|
||||
$text = rgb(cdd6f4)
|
||||
$textAlpha = cdd6f4
|
||||
|
||||
$subtext1 = rgb(bac2de)
|
||||
$subtext1Alpha = bac2de
|
||||
|
||||
$subtext0 = rgb(a6adc8)
|
||||
$subtext0Alpha = a6adc8
|
||||
|
||||
$overlay2 = rgb(9399b2)
|
||||
$overlay2Alpha = 9399b2
|
||||
|
||||
$overlay1 = rgb(7f849c)
|
||||
$overlay1Alpha = 7f849c
|
||||
|
||||
$overlay0 = rgb(6c7086)
|
||||
$overlay0Alpha = 6c7086
|
||||
|
||||
$surface2 = rgb(585b70)
|
||||
$surface2Alpha = 585b70
|
||||
|
||||
$surface1 = rgb(45475a)
|
||||
$surface1Alpha = 45475a
|
||||
|
||||
$surface0 = rgb(313244)
|
||||
$surface0Alpha = 313244
|
||||
|
||||
$base = rgb(1e1e2e)
|
||||
$baseAlpha = 1e1e2e
|
||||
|
||||
$mantle = rgb(181825)
|
||||
$mantleAlpha = 181825
|
||||
|
||||
$crust = rgb(11111b)
|
||||
$crustAlpha = 11111b
|
||||
@@ -0,0 +1,88 @@
|
||||
# Central theme: catppuccin-mocha (Catppuccin Mocha), kitty colors.
|
||||
# Part of basic/.config/themes. Managed file: refresh via
|
||||
# basic/scripts/fetch-ports.sh
|
||||
# (upstream: catppuccin/kitty themes/mocha.conf).
|
||||
# vim:ft=kitty
|
||||
|
||||
## name: Catppuccin Kitty Mocha
|
||||
## author: Catppuccin Org
|
||||
## license: MIT
|
||||
## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf
|
||||
## blurb: Soothing pastel theme for the high-spirited!
|
||||
|
||||
|
||||
|
||||
# The basic colors
|
||||
foreground #cdd6f4
|
||||
background #1e1e2e
|
||||
selection_foreground #1e1e2e
|
||||
selection_background #f5e0dc
|
||||
|
||||
# Cursor colors
|
||||
cursor #f5e0dc
|
||||
cursor_text_color #1e1e2e
|
||||
|
||||
# Scrollbar colors
|
||||
scrollbar_handle_color #9399b2
|
||||
scrollbar_track_color #45475a
|
||||
|
||||
# URL color when hovering with mouse
|
||||
url_color #f5e0dc
|
||||
|
||||
# Kitty window border colors
|
||||
active_border_color #b4befe
|
||||
inactive_border_color #6c7086
|
||||
bell_border_color #f9e2af
|
||||
|
||||
# OS Window titlebar colors
|
||||
wayland_titlebar_color system
|
||||
macos_titlebar_color system
|
||||
|
||||
# Tab bar colors
|
||||
active_tab_foreground #11111b
|
||||
active_tab_background #cba6f7
|
||||
inactive_tab_foreground #cdd6f4
|
||||
inactive_tab_background #181825
|
||||
tab_bar_background #11111b
|
||||
|
||||
# Colors for marks (marked text in the terminal)
|
||||
mark1_foreground #1e1e2e
|
||||
mark1_background #b4befe
|
||||
mark2_foreground #1e1e2e
|
||||
mark2_background #cba6f7
|
||||
mark3_foreground #1e1e2e
|
||||
mark3_background #74c7ec
|
||||
|
||||
# The 16 terminal colors
|
||||
|
||||
# black
|
||||
color0 #45475a
|
||||
color8 #585b70
|
||||
|
||||
# red
|
||||
color1 #f38ba8
|
||||
color9 #f38ba8
|
||||
|
||||
# green
|
||||
color2 #a6e3a1
|
||||
color10 #a6e3a1
|
||||
|
||||
# yellow
|
||||
color3 #f9e2af
|
||||
color11 #f9e2af
|
||||
|
||||
# blue
|
||||
color4 #89b4fa
|
||||
color12 #89b4fa
|
||||
|
||||
# magenta
|
||||
color5 #f5c2e7
|
||||
color13 #f5c2e7
|
||||
|
||||
# cyan
|
||||
color6 #94e2d5
|
||||
color14 #94e2d5
|
||||
|
||||
# white
|
||||
color7 #bac2de
|
||||
color15 #a6adc8
|
||||
@@ -0,0 +1,33 @@
|
||||
/* Central theme: catppuccin-mocha (Catppuccin Mocha), rofi palette.
|
||||
* Part of basic/.config/themes. Managed file: refresh via
|
||||
* basic/scripts/fetch-ports.sh
|
||||
* (upstream: catppuccin/rofi themes/catppuccin-mocha.rasi). */
|
||||
* {
|
||||
rosewater: #f5e0dc;
|
||||
flamingo: #f2cdcd;
|
||||
pink: #f5c2e7;
|
||||
mauve: #cba6f7;
|
||||
red: #f38ba8;
|
||||
maroon: #eba0ac;
|
||||
peach: #fab387;
|
||||
yellow: #f9e2af;
|
||||
green: #a6e3a1;
|
||||
teal: #94e2d5;
|
||||
sky: #89dceb;
|
||||
sapphire: #74c7ec;
|
||||
blue: #89b4fa;
|
||||
lavender: #b4befe;
|
||||
text: #cdd6f4;
|
||||
subtext1: #bac2de;
|
||||
subtext0: #a6adc8;
|
||||
overlay2: #9399b2;
|
||||
overlay1: #7f849c;
|
||||
overlay0: #6c7086;
|
||||
surface2: #585b70;
|
||||
surface1: #45475a;
|
||||
surface0: #313244;
|
||||
base: #1e1e2e;
|
||||
mantle: #181825;
|
||||
crust: #11111b;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/* Central theme: catppuccin-mocha (Catppuccin Mocha).
|
||||
* Part of basic/.config/themes. Managed file: refresh via
|
||||
* basic/scripts/fetch-ports.sh (upstream: catppuccin/waybar themes/mocha.css),
|
||||
* then re-apply the role aliases below. Consumers must use this file via
|
||||
* ~/.config/themes/current/theme.css, never a private copy.
|
||||
* Role aliases (stable interface, theme-agnostic) follow the palette. */
|
||||
@define-color rosewater #f5e0dc;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color red #f38ba8;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color peach #fab387;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color sky #89dceb;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext1 #bac2de;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color overlay2 #9399b2;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color surface2 #585b70;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface0 #313244;
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
|
||||
/* ---- Stable role interface (theme-agnostic; consumers use THESE) ----
|
||||
* NOTE: values are literal hex, NOT @references to the palette above.
|
||||
* Some parsers (wofi/waybar Gtk.CssProvider paths) silently drop
|
||||
* @define-color lines that reference another @color, which made every
|
||||
* background transparent. Keep each role in sync with its palette twin
|
||||
* (mapping below); scripts/sync-theme.sh verifies this mechanically. */
|
||||
@define-color bg #1e1e2e; /* = @base */
|
||||
@define-color bg_dim #181825; /* = @mantle */
|
||||
@define-color bg_deep #11111b; /* = @crust */
|
||||
@define-color bg_translucent rgba(17, 17, 27, 0.85); /* crust at 85% (translucent window bg) */
|
||||
@define-color fg #cdd6f4; /* = @text */
|
||||
@define-color fg_dim #a6adc8; /* = @subtext0 */
|
||||
@define-color fg_muted #7f849c; /* = @overlay1 */
|
||||
@define-color surface #313244; /* = @surface0 */
|
||||
@define-color border #45475a; /* = @surface1 */
|
||||
@define-color accent #74c7ec; /* = @sapphire */
|
||||
@define-color accent2 #b4befe; /* = @lavender */
|
||||
@define-color ok #a6e3a1; /* = @green */
|
||||
@define-color warn #f9e2af; /* = @yellow */
|
||||
@define-color urgent #f38ba8; /* = @red */
|
||||
@@ -0,0 +1,42 @@
|
||||
# Central theme interface: catppuccin-mocha (Catppuccin Mocha).
|
||||
# Part of basic/.config/themes. Managed file: edit the palette here.
|
||||
# Sourced by POSIX shells (~/.bashrc) and by Hyprland-launched apps.
|
||||
# Generic THEME_* vars are the stable, theme-agnostic interface; the
|
||||
# CATPPUCCIN_* / palette vars below exist because lazy.nvim, TPM and
|
||||
# starship need the literal upstream names. A future non-Catppuccin theme
|
||||
# only adds a new directory exporting the same THEME_* names.
|
||||
|
||||
export THEME_NAME="catppuccin"
|
||||
export THEME_FLAVOR="mocha"
|
||||
export THEME_ID="catppuccin-mocha"
|
||||
|
||||
# Generic roles (stable interface).
|
||||
export THEME_BG="#1e1e2e"
|
||||
export THEME_BG_DIM="#181825"
|
||||
export THEME_FG="#cdd6f4"
|
||||
export THEME_FG_DIM="#a6adc8"
|
||||
export THEME_SURFACE="#313244"
|
||||
export THEME_BORDER="#45475a"
|
||||
export THEME_ACCENT="#74c7ec"
|
||||
export THEME_ACCENT2="#b4befe"
|
||||
export THEME_OK="#a6e3a1"
|
||||
export THEME_WARN="#f9e2af"
|
||||
export THEME_URGENT="#f38ba8"
|
||||
|
||||
# Plugin / colorscheme mapping (see ../registry.conf).
|
||||
export THEME_NVIM_COLORSCHEME="catppuccin"
|
||||
export THEME_TMUX_PLUGIN="catppuccin/tmux"
|
||||
export THEME_GTK="Adwaita:dark"
|
||||
|
||||
# Upstream literal names (compat for lazy.nvim / TPM / starship).
|
||||
export CATPPUCCIN_FLAVOR="mocha"
|
||||
export CATPPUCCIN_BASE="#1e1e2e"
|
||||
export CATPPUCCIN_MANTLE="#181825"
|
||||
export CATPPUCCIN_CRUST="#11111b"
|
||||
export CATPPUCCIN_TEXT="#cdd6f4"
|
||||
export CATPPUCCIN_SAPPHIRE="#74c7ec"
|
||||
export CATPPUCCIN_LAVENDER="#b4befe"
|
||||
export CATPPUCCIN_SURFACE1="#45475a"
|
||||
export CATPPUCCIN_RED="#f38ba8"
|
||||
export CATPPUCCIN_GREEN="#a6e3a1"
|
||||
export CATPPUCCIN_YELLOW="#f9e2af"
|
||||
@@ -0,0 +1,25 @@
|
||||
# Central theme interface: catppuccin-mocha (Catppuccin Mocha).
|
||||
# Fish companion of theme.env.sh. Sourced from fish/config.fish.
|
||||
# Managed file: edit the palette here, not in consumers.
|
||||
|
||||
set -gx THEME_NAME "catppuccin"
|
||||
set -gx THEME_FLAVOR "mocha"
|
||||
set -gx THEME_ID "catppuccin-mocha"
|
||||
|
||||
set -gx THEME_BG "#1e1e2e"
|
||||
set -gx THEME_BG_DIM "#181825"
|
||||
set -gx THEME_FG "#cdd6f4"
|
||||
set -gx THEME_FG_DIM "#a6adc8"
|
||||
set -gx THEME_SURFACE "#313244"
|
||||
set -gx THEME_BORDER "#45475a"
|
||||
set -gx THEME_ACCENT "#74c7ec"
|
||||
set -gx THEME_ACCENT2 "#b4befe"
|
||||
set -gx THEME_OK "#a6e3a1"
|
||||
set -gx THEME_WARN "#f9e2af"
|
||||
set -gx THEME_URGENT "#f38ba8"
|
||||
|
||||
set -gx THEME_NVIM_COLORSCHEME "catppuccin"
|
||||
set -gx THEME_TMUX_PLUGIN "catppuccin/tmux"
|
||||
set -gx THEME_GTK "Adwaita:dark"
|
||||
|
||||
set -gx CATPPUCCIN_FLAVOR "mocha"
|
||||
@@ -0,0 +1,87 @@
|
||||
-- Central theme interface: catppuccin-mocha (Catppuccin Mocha).
|
||||
-- Part of basic/.config/themes. Managed file: edit the palette here.
|
||||
-- Consumers (hyprland.lua, hyprlock helpers) load this via
|
||||
-- dofile(os.getenv("HOME") .. "/.config/themes/current/theme.lua")
|
||||
-- and must use the generic roles (bg/fg/accent/...) so a future
|
||||
-- non-Catppuccin theme only adds a new directory. Full palette is
|
||||
-- passed through for components that need specific colors.
|
||||
-- Hyprland color syntax: "rgb(hex)" / "rgba(hexaa)".
|
||||
|
||||
local T = {
|
||||
name = "catppuccin",
|
||||
flavor = "mocha",
|
||||
|
||||
hex = {
|
||||
rosewater = "f5e0dc",
|
||||
flamingo = "f2cdcd",
|
||||
pink = "f5c2e7",
|
||||
mauve = "cba6f7",
|
||||
red = "f38ba8",
|
||||
maroon = "eba0ac",
|
||||
peach = "fab387",
|
||||
yellow = "f9e2af",
|
||||
green = "a6e3a1",
|
||||
teal = "94e2d5",
|
||||
sky = "89dceb",
|
||||
sapphire = "74c7ec",
|
||||
blue = "89b4fa",
|
||||
lavender = "b4befe",
|
||||
text = "cdd6f4",
|
||||
subtext1 = "bac2de",
|
||||
subtext0 = "a6adc8",
|
||||
overlay2 = "9399b2",
|
||||
overlay1 = "7f849c",
|
||||
overlay0 = "6c7086",
|
||||
surface2 = "585b70",
|
||||
surface1 = "45475a",
|
||||
surface0 = "313244",
|
||||
base = "1e1e2e",
|
||||
mantle = "181825",
|
||||
crust = "11111b",
|
||||
},
|
||||
|
||||
-- Generic roles (stable interface, theme-agnostic).
|
||||
bg = "rgba(1e1e2eee)",
|
||||
bg_dim = "rgb(181825)",
|
||||
fg = "rgb(cdd6f4)",
|
||||
fg_dim = "rgb(a6adc8)",
|
||||
surface = "rgb(313244)",
|
||||
border_active = "rgba(74c7ecee)",
|
||||
border_inactive = "rgba(45475aee)",
|
||||
shadow = "rgba(74c7ecee)",
|
||||
accent = "rgb(74c7ec)",
|
||||
accent2 = "rgb(b4befe)",
|
||||
ok = "rgb(a6e3a1)",
|
||||
warn = "rgb(f9e2af)",
|
||||
urgent = "rgb(f38ba8)",
|
||||
|
||||
-- Full palette passthrough (hyprland syntax).
|
||||
rosewater = "rgb(f5e0dc)",
|
||||
flamingo = "rgb(f2cdcd)",
|
||||
pink = "rgb(f5c2e7)",
|
||||
mauve = "rgb(cba6f7)",
|
||||
red = "rgb(f38ba8)",
|
||||
maroon = "rgb(eba0ac)",
|
||||
peach = "rgb(fab387)",
|
||||
yellow = "rgb(f9e2af)",
|
||||
green = "rgb(a6e3a1)",
|
||||
teal = "rgb(94e2d5)",
|
||||
sky = "rgb(89dceb)",
|
||||
sapphire = "rgb(74c7ec)",
|
||||
blue = "rgb(89b4fa)",
|
||||
lavender = "rgb(b4befe)",
|
||||
text = "rgb(cdd6f4)",
|
||||
subtext1 = "rgb(bac2de)",
|
||||
subtext0 = "rgb(a6adc8)",
|
||||
overlay2 = "rgb(9399b2)",
|
||||
overlay1 = "rgb(7f849c)",
|
||||
overlay0 = "rgb(6c7086)",
|
||||
surface2 = "rgb(585b70)",
|
||||
surface1 = "rgb(45475a)",
|
||||
surface0 = "rgb(313244)",
|
||||
base = "rgb(1e1e2e)",
|
||||
mantle = "rgb(181825)",
|
||||
crust = "rgb(11111b)",
|
||||
}
|
||||
|
||||
return T
|
||||
@@ -0,0 +1,10 @@
|
||||
# Central theme registry (basic/.config/themes/themes/registry.conf).
|
||||
#
|
||||
# One row per installed theme. Columns (pipe-separated):
|
||||
# theme-id | nvim colorscheme | tmux plugin | gtk theme | notes
|
||||
#
|
||||
# Consumers must branch on THEME_ID / THEME_NVIM_COLORSCHEME /
|
||||
# THEME_TMUX_PLUGIN only — never on hardcoded theme names elsewhere.
|
||||
# Adding a future non-Catppuccin theme means: scaffold the directory with
|
||||
# scripts/new-theme.sh, fill in its palette, add one row here.
|
||||
catppuccin-mocha|catppuccin|catppuccin/tmux|Adwaita:dark|default; Catppuccin Mocha everywhere
|
||||
@@ -0,0 +1,4 @@
|
||||
setup.sh
|
||||
packages.txt
|
||||
scripts
|
||||
.stow-ignore
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# Refresh vendored upstream port files (basic/scripts/fetch-ports.sh).
|
||||
#
|
||||
# This script is intentionally NOT stowed (basic/.stow-ignore) and NOT run
|
||||
# by the test harness: it contacts the network. Run it manually when you
|
||||
# want to pull newer upstream Catppuccin ports into the central theme:
|
||||
#
|
||||
# bash basic/scripts/fetch-ports.sh
|
||||
#
|
||||
# The central palette (theme.lua / theme.css roles / hypr.conf) remains the
|
||||
# source of truth; after fetching, re-apply the provenance headers and the
|
||||
# role-alias block at the end of theme.css if upstream overwrote them.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
DEST="$SCRIPT_DIR/../.config/themes/themes/catppuccin-mocha"
|
||||
|
||||
# Pinned upstream revisions (bump deliberately, then run this script).
|
||||
KITTY_PIN="main"
|
||||
WAYBAR_PIN="main"
|
||||
ROFI_PIN="main"
|
||||
|
||||
curl -fsSL "https://raw.githubusercontent.com/catppuccin/kitty/${KITTY_PIN}/themes/mocha.conf" \
|
||||
-o "$DEST/kitty.conf"
|
||||
curl -fsSL "https://raw.githubusercontent.com/catppuccin/waybar/${WAYBAR_PIN}/themes/mocha.css" \
|
||||
-o "$DEST/theme.css"
|
||||
curl -fsSL "https://raw.githubusercontent.com/catppuccin/rofi/${ROFI_PIN}/themes/catppuccin-mocha.rasi" \
|
||||
-o "$DEST/rofi.rasi"
|
||||
|
||||
echo "ports refreshed into $DEST"
|
||||
echo "reminder: re-apply file headers + theme.css role aliases, then run scripts/sync-theme.sh"
|
||||
Reference in New Issue
Block a user