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: Add render-assets.sh for chrome

by roundabout, Wednesday, 13 June 2018, 16:37:48 (1528907868), pushed by roundabout, Sunday, 11 May 2025, 13:22:26 (1746969746)

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

483088b216077c52bcda3e8b30e2c1380d65026a

render-assets.sh

@@ -11,6 +11,11 @@ if [[ ! "$(which optipng 2> /dev/null)" ]]; then

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              exit 1
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            fi
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome() (
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          cd src/chrome
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          ./render-assets.sh
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        )
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            gtk() (
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              cd src/gtk
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              ./render-assets.sh
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -28,10 +33,14 @@ gtk2_dark() (

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            case "${1:-}" in
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              "")
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            chrome
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                gtk
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                gtk2_light
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                gtk2_dark
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                ;;
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          chrome)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            chrome
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            ;;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              gtk)
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                gtk
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                ;;
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -47,7 +56,7 @@ case "${1:-}" in

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

src/chrome/assets.txt

@@ -0,0 +1,12 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-scrollbar/icons/16
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-scrollbar/icons/48
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-scrollbar/icons/128
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-scrollbar-dark/icons/16
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-scrollbar-dark/icons/48
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-scrollbar-dark/icons/128
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-theme/theme_frame
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-theme/theme_toolbar
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-theme-dark/theme_frame
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-theme-dark/theme_toolbar
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-theme-light/theme_frame
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        chrome-theme-light/theme_toolbar
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/chrome/render-asset.sh

@@ -0,0 +1,11 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        #!/bin/bash
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        set -ueo pipefail
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        INKSCAPE="$(which inkscape)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        OPTIPNG="$(which optipng)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        i="$1"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        echo "Rendering '$i.png'"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        "$INKSCAPE" --export-png="$i.png" "$i.svg" >/dev/null \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        && "$OPTIPNG" -o7 --quiet "$i.png"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/chrome/render-assets.sh

@@ -0,0 +1,12 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        #!/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 2> /dev/null)" ]]; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          cmd=(parallel)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          cmd=(xargs -n1)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        "${cmd[@]}" ./render-asset.sh < assets.txt