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.

scripts: Simplify render-assets.sh

Don't remove, just overwrite when rendering assets.

by roundabout, Wednesday, 13 June 2018, 16:22:39 (1528906959), pushed by roundabout, Sunday, 11 May 2025, 13:22:26 (1746969746)

Author identity: nana-4 <hnmaigo@gmail.com>

68cb93633bc6ed3960d36fc9fff63e640fa00f2a

render-assets.sh

@@ -13,19 +13,16 @@ fi

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            gtk() (
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              cd src/gtk
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          rm assets/*.png || :
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              ./render-assets.sh
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            )
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            gtk2_light() (
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              cd src/gtk-2.0
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          rm assets/*.png || :
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              ./render-assets.sh light
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            )
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            gtk2_dark() (
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              cd src/gtk-2.0
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          rm assets-dark/*.png || :
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              ./render-assets.sh dark
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            )
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -51,5 +48,6 @@ case "${1:-}" in

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              *)
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                echo "Unknown argument: '$1'"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                echo "Use 'gtk', 'gtk2', 'gtk2-light' or 'gtk2-dark' as an argument."
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            exit 1
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                ;;
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            esac
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/gtk-2.0/render-asset.sh

@@ -1,4 +1,4 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        #! /bin/bash
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        #!/bin/bash
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            set -ueo pipefail
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            INKSCAPE="$(which inkscape)"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -21,16 +21,9 @@ else

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              EXTRA_OPTIONS=()
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            fi
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if [[ -f "$ASSETS_DIR/$i.png" ]]; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          echo "'$ASSETS_DIR/$i.png' exists."
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          echo "Rendering '$ASSETS_DIR/$i.png'"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          "$INKSCAPE" --export-id="$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      --export-id-only \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      --export-background-opacity=0 \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      ${EXTRA_OPTIONS+"${EXTRA_OPTIONS[@]}"} \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      --export-png="$ASSETS_DIR/$i.png" "$SRC_FILE" >/dev/null \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          && "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        exit 0
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        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"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/gtk-2.0/render-assets.sh

@@ -1,9 +1,12 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        #! /bin/bash
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        #!/bin/bash
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            set -ueo pipefail
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            # Make sure that parallel is GNU parallel and not moreutils.
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            # Otherwise, it fails silently. There's no smooth way to detect this.
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if which parallel > /dev/null; then cmd=(parallel)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else cmd=(xargs -n1); fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if [[ "$(which parallel 2> /dev/null)" ]]; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          cmd=(parallel)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          cmd=(xargs -n1)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            "${cmd[@]}" ./render-asset.sh "$1" < assets.txt
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/gtk/render-asset.sh

@@ -1,4 +1,4 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        #! /bin/bash
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        #!/bin/bash
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            set -ueo pipefail
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            INKSCAPE="$(which inkscape)"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -9,25 +9,15 @@ ASSETS_DIR="assets"

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            i="$1"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if [[ -f "$ASSETS_DIR/$i.png" ]]; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          echo "'$ASSETS_DIR/$i.png' exists."
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          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"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        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 [[ -f "$ASSETS_DIR/$i@2.png" ]]; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          echo "'$ASSETS_DIR/$i@2.png' exists."
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          echo "Rendering '$ASSETS_DIR/$i@2.png'"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          "$INKSCAPE" --export-id="$i" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      --export-dpi=192 \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      --export-id-only \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      --export-png="$ASSETS_DIR/$i@2.png" "$SRC_FILE" >/dev/null \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          && "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i@2.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        exit 0
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        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"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/gtk/render-assets.sh

@@ -1,9 +1,12 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        #! /bin/bash
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        #!/bin/bash
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            set -ueo pipefail
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            # Make sure that parallel is GNU parallel and not moreutils.
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            # Otherwise, it fails silently. There's no smooth way to detect this.
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if which parallel > /dev/null; then cmd=(parallel)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else cmd=(xargs -n1); fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if [[ "$(which parallel 2> /dev/null)" ]]; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          cmd=(parallel)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          cmd=(xargs -n1)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            "${cmd[@]}" ./render-asset.sh < assets.txt