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.

feat(render_assets): optional support for resvg (#329)

  • feat(render_assets): optional support for resvg

  • fix(sass: colors.scss.template): fix BTN_BG in GTK+3 theme (though in GTK+2 it still not working)

  • fix(sass: colors.scss.template): fix TXT_BG in entries GTK+3 theme

  • fix(sass: colors.scss.template): fix ACCENT_BG in checkboxes and radios GTK+3 theme

  • fix(change_color.sh): address PR review

  • Revert "fix(sass: colors.scss.template): fix ACCENT_BG in checkboxes and radios GTK+3 theme"

This reverts commit e72fd4e1e9e70748b9724233a9cd03bd58b60061.

  • fix(*: render_asset): address more issues found during PR review

  • Revert "fix(sass: colors.scss.template): fix TXT_BG in entries GTK+3 theme"

This reverts commit 4abc517b50c9e847ce4e0dadad1aabe1874d1578.

  • Revert "fix(sass: colors.scss.template): fix BTN_BG in GTK+3 theme (though in GTK+2 it still not working)"

This reverts commit 920b37732105b1c13d8b6209b1a10611aaa27ebf.

by roundabout, Wednesday, 19 December 2018, 15:51:16 (1545234676), pushed by roundabout, Sunday, 11 May 2025, 13:22:31 (1746969751)

Author identity: nana-4 <nana-4@users.noreply.github.com>

42963b376bda24978a8b067a8b7bd7d3af14d346

src/chrome/render-asset.sh

@@ -1,11 +1,17 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            #!/bin/bash
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            set -ueo pipefail
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        INKSCAPE="$(which inkscape)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        OPTIPNG="$(which optipng)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        RENDER_SVG="$(command -v rendersvg)" || true
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        INKSCAPE="$(command -v inkscape)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        OPTIPNG="$(command -v optipng)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            i="$1"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            echo "Rendering '$i.png'"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        "$INKSCAPE" --export-png="$i.png" "$i.svg" >/dev/null \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        && "$OPTIPNG" -o7 --quiet "$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if [[ -n "${RENDER_SVG}" ]] ; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          "$RENDER_SVG" --dpi 96 "$i.svg" "$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          "$INKSCAPE" --export-dpi=96 --export-png="$i.png" "$i.svg" >/dev/null
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        "$OPTIPNG" -o7 --quiet "$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/gtk-2.0/render-asset.sh

@@ -1,8 +1,9 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            #!/bin/bash
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            set -ueo pipefail
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        INKSCAPE="$(which inkscape)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        OPTIPNG="$(which optipng)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        RENDER_SVG="$(command -v rendersvg)" || true
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        INKSCAPE="$(command -v inkscape)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        OPTIPNG="$(command -v optipng)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            if [[ "$1" == "dark" ]]; then
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              SRC_FILE="assets-dark.svg"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -14,16 +15,28 @@ fi

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            i="$2"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        # @TODO: remove $ZOOM when it will be fixed/implemented in resvg
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            GTK2_HIDPI="$(echo "${GTK2_HIDPI-False}" | tr '[:upper:]' '[:lower:]')"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            if [[ "${GTK2_HIDPI}" == "true" ]] ; then
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          EXTRA_OPTIONS=("--export-dpi=192")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          DPI=192
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          ZOOM=2
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            else
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          EXTRA_OPTIONS=()
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          DPI=96
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          ZOOM=1
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            fi
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            echo "Rendering '$ASSETS_DIR/$i.png'"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        "$INKSCAPE" --export-id="$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    --export-id-only \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    ${EXTRA_OPTIONS+"${EXTRA_OPTIONS[@]}"} \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    --export-png="$ASSETS_DIR/$i.png" "$SRC_FILE" >/dev/null \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        && "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if [[ -n "${RENDER_SVG}" ]] ; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        	# @TODO: remove --zoom when it will be fixed/implemented in resvg
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          "$RENDER_SVG" --export-id "$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --dpi ${DPI} \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --zoom ${ZOOM} \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                 "$SRC_FILE" "$ASSETS_DIR/$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          "$INKSCAPE" --export-id="$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --export-id-only \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --export-dpi=${DPI} \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --export-png="$ASSETS_DIR/$i.png" "$SRC_FILE" >/dev/null
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/gtk/render-asset.sh

@@ -1,8 +1,9 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            #!/bin/bash
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            set -ueo pipefail
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        INKSCAPE="$(which inkscape)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        OPTIPNG="$(which optipng)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        RENDER_SVG="$(command -v rendersvg)" || true
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        INKSCAPE="$(command -v inkscape)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        OPTIPNG="$(command -v optipng)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            SRC_FILE="assets.svg"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            ASSETS_DIR="assets"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -10,14 +11,27 @@ ASSETS_DIR="assets"

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            i="$1"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            echo "Rendering '$ASSETS_DIR/$i.png'"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        "$INKSCAPE" --export-id="$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    --export-id-only \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    --export-png="$ASSETS_DIR/$i.png" "$SRC_FILE" >/dev/null \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        && "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if [[ -n "${RENDER_SVG}" ]] ; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          "$RENDER_SVG" --export-id "$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                 "$SRC_FILE" "$ASSETS_DIR/$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          "$INKSCAPE" --export-id="$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --export-id-only \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --export-png="$ASSETS_DIR/$i.png" "$SRC_FILE" >/dev/null
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            echo "Rendering '$ASSETS_DIR/$i@2.png'"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        "$INKSCAPE" --export-id="$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    --export-id-only \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    --export-dpi=192 \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    --export-png="$ASSETS_DIR/$i@2.png" "$SRC_FILE" >/dev/null \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        && "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i@2.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if [[ -n "${RENDER_SVG}" ]] ; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        	# @TODO: remove --zoom when it will be fixed/implemented in resvg
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          "$RENDER_SVG" --export-id "$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --dpi 192 \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --zoom 2 \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                 "$SRC_FILE" "$ASSETS_DIR/$i@2.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          "$INKSCAPE" --export-id="$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --export-id-only \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --export-dpi=192 \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                --export-png="$ASSETS_DIR/$i@2.png" "$SRC_FILE" >/dev/null
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i@2.png"