A fork of the Materia GTK theme.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

install.sh: Support the new gnome-shell versioning

roundabout,
created on Saturday, 6 March 2021, 23:36:26 (1615073786), received on Sunday, 11 May 2025, 13:22:59 (1746969779)
Author identity: nana-4 <hnmaigo@gmail.com>

231f93f6b659d89d4c432be87df35482198943f5

install.sh

@@ -12,17 +12,19 @@ SIZE_VARIANTS=('' '-compact')

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            GTK_VERSIONS=('3.0')
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        # Set a proper gnome-shell theme version
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            if [[ -z "${GS_VERSION:-}" ]]; then
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          # Set a proper gnome-shell theme version
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              if [[ "$(command -v gnome-shell)" ]]; then
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            CURRENT_GS_VERSION="$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -2)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            MAJOR_VER="$(echo "$CURRENT_GS_VERSION" | cut -d . -f 1)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            MINOR_VER="$(echo "$CURRENT_GS_VERSION" | cut -d . -f 2)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            if (( "$MINOR_VER" % 2 == 0 )); then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              GS_VERSION="$MAJOR_VER.$MINOR_VER"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            GS_FULL_VERSION="$(gnome-shell --version | rev | cut -d ' ' -f 1 | rev)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            GS_MAJOR_VERSION="$(echo "$GS_FULL_VERSION" | cut -d . -f 1)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            GS_MINOR_VERSION="$(echo "$GS_FULL_VERSION" | cut -d . -f 2)"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            if (( "$GS_MAJOR_VERSION" >= 40 )); then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              GS_VERSION="$GS_MAJOR_VERSION"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            elif (( "$GS_MINOR_VERSION" % 2 == 0 )); then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              GS_VERSION="$GS_MAJOR_VERSION.$GS_MINOR_VERSION"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                else
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              GS_VERSION="$MAJOR_VER.$(($MINOR_VER + 1))"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              GS_VERSION="$GS_MAJOR_VERSION.$((GS_MINOR_VERSION + 1))"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                fi
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              else
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                echo "'gnome-shell' not found, using styles for last gnome-shell version available."