chamesle

chamesle.org: the site of Chamesle, a small Linux distribution
git clone https://github.com/tortr-rs/chamesle
Log | Files | Refs | README

render.sh (2617B)


      1 #!/bin/sh
      2 # renders the wallpaper, logo icons and boot splash into overlay/
      3 # logo.png is the cut out logo (cutout.py), logo.jpeg the original
      4 set -eu
      5 cd "$(dirname "$0")"
      6 out=../overlay/usr/share
      7 # wallpapers, login screen logo and the start button go in the artwork package
      8 look=../tools/pkg/chamesle-artwork/files/usr/share
      9 resvg=${RESVG:-resvg}
     10 
     11 mkdir -p $look/backgrounds/chamesle $out/plymouth/themes/chamesle
     12 python3 wallpaper.py > wallpaper.svg
     13 $resvg -w 3840 -h 2160 wallpaper.svg $look/backgrounds/chamesle/default.png
     14 # the boot menu of an installed system (grub is slow with big images)
     15 $resvg -w 1920 -h 1080 wallpaper.svg $look/backgrounds/chamesle/grub.png
     16 
     17 tmp=$(mktemp -d)
     18 cp logo.png $tmp/
     19 printf '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512"><image width="512" height="512" xlink:href="logo.png"/></svg>\n' > $tmp/logo.svg
     20 for s in 16 24 32 48 64 128 256; do
     21     mkdir -p $out/icons/hicolor/${s}x$s/apps
     22     $resvg --resources-dir $tmp -w $s -h $s $tmp/logo.svg $out/icons/hicolor/${s}x$s/apps/chamesle-start.png
     23 done
     24 $resvg --resources-dir $tmp -w 512 -h 512 $tmp/logo.svg $out/plymouth/themes/chamesle/logo.png
     25 rm -rf $tmp
     26 
     27 # text logo for fastfetch
     28 mkdir -p $out/chamesle
     29 python3 ascii.py logo.png 34 > $out/chamesle/logo.txt
     30 
     31 # login screen logo: the mark and the name, white text (FONTS=dir with Inter in it)
     32 mkdir -p $look/chamesle
     33 tmp=$(mktemp -d)
     34 cp logo.png $tmp/
     35 cat > $tmp/greeter.svg <<'SVG'
     36 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="340" height="80">
     37   <image xlink:href="logo.png" x="0" y="4" width="72" height="72"/>
     38   <text x="88" y="54" font-family="Inter, Noto Sans, sans-serif" font-size="40" font-weight="600" fill="#ffffff">Chamesle</text>
     39 </svg>
     40 SVG
     41 $resvg --resources-dir $tmp ${FONTS:+--use-fonts-dir $FONTS} $tmp/greeter.svg $look/chamesle/greeter-logo.png
     42 rm -rf $tmp
     43 
     44 # the Chamesle icon theme: Papirus, with the logo as the start button (start-here)
     45 tmp=$(mktemp -d)
     46 cp logo.png $tmp/
     47 printf '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512"><image width="512" height="512" xlink:href="logo.png"/></svg>\n' > $tmp/logo.svg
     48 for s in 16 22 24 32 48 64 128 256; do
     49     mkdir -p $look/icons/Chamesle/${s}x$s/places
     50     $resvg --resources-dir $tmp -w $s -h $s $tmp/logo.svg $look/icons/Chamesle/${s}x$s/places/start-here.png
     51     # cinnamon's menu button asks for this one
     52     cp $look/icons/Chamesle/${s}x$s/places/start-here.png $look/icons/Chamesle/${s}x$s/places/cinnamon-symbolic.png
     53 done
     54 rm -rf $tmp