consistent styling

This commit is contained in:
2026-09-21 22:39:09 +02:00
parent c54c7a2b9d
commit 90a9390f37
37 changed files with 1004 additions and 263 deletions
+26
View File
@@ -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"