Skip to content

Commit

Permalink
refactor: dont build at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoudham committed Oct 19, 2024
1 parent af05a06 commit 8b606f6
Show file tree
Hide file tree
Showing 9,037 changed files with 123,988 additions and 164 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
27 changes: 2 additions & 25 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ set -eu

INKSCAPE_VERSION=$(inkscape --version 2>/dev/null | awk '/Inkscape[ ]/ {print $2; exit}')

if ! command -v whiskers &> /dev/null; then
echo "Error: whiskers is not installed or not in PATH."
exit
fi

whiskerify() {
local src_dir="$1"

if [[ -n "$2" ]]; then
flavour="-f $2"
fi

for file in $src_dir/templates/*.tera; do
[ -f "$file" ] || continue
whiskers $file $flavour
done
}

# Generates the commands required for SVG -> PNG conversion
# These commands are to be used within inkscape's "shell" mode which allows for batch processing in a single inkscape process
generate_inkscape_commands() {
Expand Down Expand Up @@ -138,7 +120,6 @@ SCRIPT_DIR="$(dirname "$0")"
SRC_DIR="$SCRIPT_DIR/src"
OUT_DIR="$SCRIPT_DIR/dist"
PNG_DIR="$SCRIPT_DIR/pngs"
WORK_DIR="$SCRIPT_DIR/work"
HL_DIR="$SCRIPT_DIR/hl"
CONFIG_DIR="$SRC_DIR/config"

Expand Down Expand Up @@ -175,14 +156,10 @@ else
echo "[INFO] - Building with hyprcursor: FALSE"
fi

echo "[INFO] - Generating SVGs..."
whiskerify $SRC_DIR $FLAVOR
echo "[INFO] - Generating SVGs complete."

echo "[INFO] - Generating inkscape commands..."
for accent in $ACCENTS; do
theme_name="catppuccin-$FLAVOR-$accent-cursors"
theme_src_dir="$WORK_DIR/$theme_name"
theme_src_dir="$SRC_DIR/$theme_name"
theme_out_dir="$OUT_DIR/$theme_name"
theme_png_dir="$PNG_DIR/$theme_name"

Expand All @@ -197,7 +174,7 @@ echo "[INFO] - Converting SVGs to PNGs complete"
echo "[INFO] - Converting to x11cursor & creating aliases..."
for accent in $ACCENTS; do
theme_name="catppuccin-$FLAVOR-$accent-cursors"
theme_src_dir="$WORK_DIR/$theme_name"
theme_src_dir="$SRC_DIR/$theme_name"
theme_out_dir="$OUT_DIR/$theme_name"
theme_png_dir="$PNG_DIR/$theme_name"

Expand Down
7 changes: 7 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ clean_hl:
zip:
./create_zips

svgs:
#!/usr/bin/env bash
for file in src/templates/*.tera; do
[ -f "$file" ] || continue
whiskers $file
done
# Generate a single flavor with accents, defaults to all accents
build f a=accents:
./build -f {{f}} -a '{{a}}'
Expand Down
22 changes: 22 additions & 0 deletions src/catppuccin-frappe-blue-cursors/alias.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/catppuccin-frappe-blue-cursors/alias_24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/catppuccin-frappe-blue-cursors/all-scroll.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/catppuccin-frappe-blue-cursors/all-scroll_24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8b606f6

Please sign in to comment.