A fork of the Materia GTK theme.

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

 render-asset.sh

View raw Download
text/x-shellscript • 691 B
Bourne-Again shell script, ASCII text executable
        
            
1
#! /bin/bash
2
set -ueo pipefail
3
4
INKSCAPE="/usr/bin/inkscape"
5
OPTIPNG="/usr/bin/optipng"
6
7
SRC_FILE="assets.svg"
8
ASSETS_DIR="assets"
9
10
i=${1}
11
12
GTK2_HIDPI=$(echo ${GTK2_HIDPI-False} | tr '[:upper:]' '[:lower:]')
13
if [[ ${GTK2_HIDPI} == "true" ]] ; then
14
EXTRA_OPTIONS="--export-dpi=192"
15
else
16
EXTRA_OPTIONS=""
17
fi
18
19
if [ -f $ASSETS_DIR/$i.png ]; then
20
echo $ASSETS_DIR/$i.png exists.
21
else
22
echo Rendering $ASSETS_DIR/$i.png
23
$INKSCAPE --export-id=$i \
24
--export-id-only \
25
--export-background-opacity=0 \
26
$EXTRA_OPTIONS \
27
--export-png=$ASSETS_DIR/$i.png $SRC_FILE >/dev/null \
28
&& $OPTIPNG -o7 --quiet $ASSETS_DIR/$i.png
29
fi
30
31
exit 0
32