Skip to content

Commit c289882

Browse files
committed
fix boot logo.. maybe?
1 parent fa1ca3d commit c289882

21 files changed

+26
-344
lines changed

branding/plymouth/generate-assets.sh

Lines changed: 17 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,23 @@
11
#!/bin/bash
2-
# Generate Plymouth theme assets for Hypercube
3-
# This script creates the spinner frames and progress bar images
2+
# Generate Plymouth watermark for Hypercube
3+
# The watermark is displayed by Fedora's built-in spinner theme
44
# Requires: ImageMagick (convert), inkscape or rsvg-convert for SVG
55

66
set -e
77

88
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
99
THEME_DIR="$SCRIPT_DIR/hypercube"
1010

11-
echo "Generating Hypercube Plymouth theme assets..."
11+
echo "Generating Hypercube Plymouth watermark..."
1212

1313
# Colors matching the neon hypercube theme
1414
PINK="#FF1493"
1515
BLUE="#00BFFF"
16-
PURPLE="#8A2BE2"
17-
BG_COLOR="#0a0a0f"
1816

19-
# Create spinner frames (12 frames for smooth rotation)
20-
echo "Creating spinner frames..."
21-
for i in $(seq 0 11); do
22-
angle=$((i * 30))
23-
24-
# Create an SVG spinner frame with rotating dots
25-
cat > "$THEME_DIR/spinner-$i.svg" << EOF
26-
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
27-
<g transform="rotate($angle 32 32)">
28-
<!-- 8 dots in a circle, with varying opacity -->
29-
<circle cx="32" cy="8" r="4" fill="$PINK" opacity="1.0"/>
30-
<circle cx="49" cy="15" r="4" fill="$PINK" opacity="0.875"/>
31-
<circle cx="56" cy="32" r="4" fill="$BLUE" opacity="0.75"/>
32-
<circle cx="49" cy="49" r="4" fill="$BLUE" opacity="0.625"/>
33-
<circle cx="32" cy="56" r="4" fill="$PURPLE" opacity="0.5"/>
34-
<circle cx="15" cy="49" r="4" fill="$PURPLE" opacity="0.375"/>
35-
<circle cx="8" cy="32" r="4" fill="$PINK" opacity="0.25"/>
36-
<circle cx="15" cy="15" r="4" fill="$PINK" opacity="0.125"/>
37-
</g>
38-
</svg>
39-
EOF
40-
41-
# Convert SVG to PNG (try multiple converters)
42-
if command -v rsvg-convert &> /dev/null; then
43-
rsvg-convert -w 64 -h 64 "$THEME_DIR/spinner-$i.svg" -o "$THEME_DIR/spinner-$i.png"
44-
elif command -v inkscape &> /dev/null; then
45-
inkscape -w 64 -h 64 "$THEME_DIR/spinner-$i.svg" -o "$THEME_DIR/spinner-$i.png" 2>/dev/null
46-
elif command -v convert &> /dev/null; then
47-
convert -background none "$THEME_DIR/spinner-$i.svg" "$THEME_DIR/spinner-$i.png"
48-
else
49-
echo "Warning: No SVG converter found. Please install rsvg-convert, inkscape, or imagemagick"
50-
echo "Keeping SVG files for manual conversion"
51-
fi
52-
done
53-
54-
# Create progress bar background
55-
echo "Creating progress bar..."
56-
cat > "$THEME_DIR/progress-bg.svg" << EOF
57-
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="8" viewBox="0 0 400 8">
58-
<rect x="0" y="0" width="400" height="8" rx="4" fill="#1a1a2e" stroke="$PURPLE" stroke-width="1"/>
59-
</svg>
60-
EOF
61-
62-
# Create progress bar foreground (gradient from pink to blue)
63-
cat > "$THEME_DIR/progress-fg.svg" << EOF
64-
<svg xmlns="http://www.w3.org/2000/svg" width="396" height="4" viewBox="0 0 396 4">
65-
<defs>
66-
<linearGradient id="neonGrad" x1="0%" y1="0%" x2="100%" y2="0%">
67-
<stop offset="0%" style="stop-color:$PINK;stop-opacity:1" />
68-
<stop offset="50%" style="stop-color:$PURPLE;stop-opacity:1" />
69-
<stop offset="100%" style="stop-color:$BLUE;stop-opacity:1" />
70-
</linearGradient>
71-
</defs>
72-
<rect x="0" y="0" width="396" height="4" rx="2" fill="url(#neonGrad)"/>
73-
</svg>
74-
EOF
75-
76-
# Convert progress bar SVGs to PNG
77-
if command -v rsvg-convert &> /dev/null; then
78-
rsvg-convert -w 400 -h 8 "$THEME_DIR/progress-bg.svg" -o "$THEME_DIR/progress-bg.png"
79-
rsvg-convert -w 396 -h 4 "$THEME_DIR/progress-fg.svg" -o "$THEME_DIR/progress-fg.png"
80-
elif command -v inkscape &> /dev/null; then
81-
inkscape -w 400 -h 8 "$THEME_DIR/progress-bg.svg" -o "$THEME_DIR/progress-bg.png" 2>/dev/null
82-
inkscape -w 396 -h 4 "$THEME_DIR/progress-fg.svg" -o "$THEME_DIR/progress-fg.png" 2>/dev/null
83-
elif command -v convert &> /dev/null; then
84-
convert -background none "$THEME_DIR/progress-bg.svg" "$THEME_DIR/progress-bg.png"
85-
convert -background none "$THEME_DIR/progress-fg.svg" "$THEME_DIR/progress-fg.png"
86-
fi
87-
88-
# Convert background.webp to PNG if it exists and we have the tools
89-
BACKGROUND_SRC="$SCRIPT_DIR/../../dot_files/hypr/background.webp"
90-
if [ -f "$BACKGROUND_SRC" ]; then
91-
echo "Converting background image..."
92-
if command -v convert &> /dev/null; then
93-
convert "$BACKGROUND_SRC" "$THEME_DIR/background.png"
94-
elif command -v ffmpeg &> /dev/null; then
95-
ffmpeg -y -i "$BACKGROUND_SRC" "$THEME_DIR/background.png" 2>/dev/null
96-
else
97-
echo "Warning: Cannot convert background.webp - please install imagemagick or ffmpeg"
98-
echo "Or manually convert dot_files/hypr/background.webp to branding/plymouth/hypercube/background.png"
99-
fi
100-
fi
101-
102-
# Create a simple logo placeholder if it doesn't exist
103-
if [ ! -f "$THEME_DIR/logo.png" ]; then
104-
echo "Creating placeholder logo..."
105-
cat > "$THEME_DIR/logo.svg" << EOF
17+
# Create watermark if it doesn't exist
18+
if [ ! -f "$THEME_DIR/watermark.png" ]; then
19+
echo "Creating watermark..."
20+
cat > "$THEME_DIR/watermark.svg" << EOF
10621
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200">
10722
<defs>
10823
<linearGradient id="cubeGrad" x1="0%" y1="0%" x2="100%" y2="100%">
@@ -127,21 +42,24 @@ if [ ! -f "$THEME_DIR/logo.png" ]; then
12742
EOF
12843

12944
if command -v rsvg-convert &> /dev/null; then
130-
rsvg-convert -w 200 -h 200 "$THEME_DIR/logo.svg" -o "$THEME_DIR/logo.png"
45+
rsvg-convert -w 200 -h 200 "$THEME_DIR/watermark.svg" -o "$THEME_DIR/watermark.png"
13146
elif command -v inkscape &> /dev/null; then
132-
inkscape -w 200 -h 200 "$THEME_DIR/logo.svg" -o "$THEME_DIR/logo.png" 2>/dev/null
47+
inkscape -w 200 -h 200 "$THEME_DIR/watermark.svg" -o "$THEME_DIR/watermark.png" 2>/dev/null
13348
elif command -v convert &> /dev/null; then
134-
convert -background none "$THEME_DIR/logo.svg" "$THEME_DIR/logo.png"
49+
convert -background none "$THEME_DIR/watermark.svg" "$THEME_DIR/watermark.png"
50+
else
51+
echo "Warning: No SVG converter found. Please install rsvg-convert, inkscape, or imagemagick"
52+
exit 1
13553
fi
136-
fi
13754

138-
# Clean up SVG files (optional - uncomment if you want to remove them)
139-
# rm -f "$THEME_DIR"/*.svg
55+
# Clean up SVG
56+
rm -f "$THEME_DIR/watermark.svg"
57+
fi
14058

14159
echo "Asset generation complete!"
14260
echo ""
14361
echo "Generated files in $THEME_DIR:"
144-
ls -la "$THEME_DIR"/*.png 2>/dev/null || echo " (PNG files will be generated when you run this script with proper tools installed)"
62+
ls -la "$THEME_DIR"/*.png 2>/dev/null || echo " (No PNG files found)"
14563
echo ""
14664
echo "Required tools (in order of preference):"
14765
echo " - rsvg-convert (from librsvg2-tools)"
-269 KB
Binary file not shown.

branding/plymouth/hypercube/hypercube.plymouth

Lines changed: 0 additions & 9 deletions
This file was deleted.

branding/plymouth/hypercube/hypercube.script

Lines changed: 0 additions & 185 deletions
This file was deleted.
-732 Bytes
Binary file not shown.
-675 Bytes
Binary file not shown.
-1.97 KB
Binary file not shown.
-2.69 KB
Binary file not shown.
-2.67 KB
Binary file not shown.
-2.66 KB
Binary file not shown.

0 commit comments

Comments
 (0)