├── .gitignore ├── Makefile ├── README.md ├── appdata.xml.in └── index.theme.in /.gitignore: -------------------------------------------------------------------------------- 1 | _build/ 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | $(shell mkdir -p _build) 2 | 3 | SHELL = bash -O extglob 4 | XDG_DATA_HOME ?= $(HOME)/.local/share 5 | 6 | help: 7 | # Makefile help: 8 | # 9 | # build-native - Build the Adwaita theme files for standard use in _build/native. 10 | # build-flatpak - Build Flatpak bundles for the themes in _build/flatpak/. 11 | # build - Runs both of the above. 12 | # install-system-native - Install the theme files to /usr/share/themes. 13 | # install-system-flatpak - Install the Flatpak-ed theme system-wide. 14 | # install-system-icons - Install the icons system-wide. 15 | # install-system - Runs all the install-system-* targets. 16 | # install-user-native - Install the theme files to ${XDG_DATA_HOME}/themes. 17 | # install-user-flatpak - Install the Flatpak-ed theme for this user only. 18 | # install-user-icons - Install the icons for to ${XDG_DATA_HOME}/icons. 19 | # install-user - Runs all the install-user-* targets. 20 | # 21 | # Each install target as an uninstall equivalent, e.g. uninstall-user-native. 22 | # In addition, the install targets run the build targets automatically. 23 | # The build targets also update the local GTK+ checkout in _build/gtk automatically. 24 | 25 | _build/warning: 26 | # **************************************** WARNING **************************************** 27 | # This theme is installed under the name "AdwaitaRefresh", HOWEVER many apps change their 28 | # behavior based on the name "Adwaita". IN ADDITION, some parts of the new theme require 29 | # corresponding GTK3 code changes. Therefore, not everything will display 100% correctly. 30 | # Examples include switches, the pathbar and find floats. 31 | # *******DO NOT, I repeat, DO NOT FILE BUGS WITH GTK+ BASED ON THE BEHAVIOR OF THIS.******* 32 | # If something appears to be a bug, test it with the proper, *named* Adwaita first. 33 | # **************************************** WARNING **************************************** 34 | @echo -n '* Press Enter to confirm this warning (this will time out in 60 seconds)... ' 35 | @read -t 60 36 | @touch $@ 37 | 38 | _internal-repo: _build/warning 39 | [ -f _build/gtk/.git/refs/remotes/origin/wip/jimmac ] && rm -rf _build/gtk ||: 40 | [ -d _build/gtk ] && \ 41 | (cd _build/gtk; git fetch origin; git reset --hard origin/gtk-3-24) || \ 42 | git clone --depth=1 -b gtk-3-24 https://gitlab.gnome.org/GNOME/gtk.git _build/gtk 43 | [ -d _build/adwaita-icon-theme ] && \ 44 | (cd _build/adwaita-icon-theme; git fetch origin; git reset --hard origin/master) || \ 45 | git clone --depth=1 https://gitlab.gnome.org/GNOME/adwaita-icon-theme.git \ 46 | _build/adwaita-icon-theme 47 | 48 | build-native: _internal-repo 49 | rm -rf _build/native 50 | 51 | mkdir -p _build/native/AdwaitaRefresh/gtk-3.0 52 | echo '@import url("gtk-contained.css");' > _build/native/AdwaitaRefresh/gtk-3.0/gtk.css 53 | echo '@import url("gtk-contained-dark.css");' > \ 54 | _build/native/AdwaitaRefresh/gtk-3.0/gtk-dark.css 55 | cp _build/gtk/gtk/theme/Adwaita/gtk-contained{,-dark}.css \ 56 | _build/native/AdwaitaRefresh/gtk-3.0 57 | cp -r _build/gtk/gtk/theme/Adwaita/assets _build/native/AdwaitaRefresh/gtk-3.0 58 | 59 | mkdir -p _build/native/AdwaitaRefresh-dark/gtk-3.0 60 | cp _build/native/AdwaitaRefresh/gtk-3.0/gtk{,-contained-dark}.css \ 61 | _build/native/AdwaitaRefresh-dark/gtk-3.0 62 | mv _build/native/AdwaitaRefresh-dark/gtk-3.0/gtk-contained{-dark,}.css 63 | cp -r _build/native/AdwaitaRefresh{,-dark}/gtk-3.0/assets 64 | 65 | sed 's/@NAME/AdwaitaRefresh/' index.theme.in > _build/native/AdwaitaRefresh/index.theme 66 | sed 's/@NAME/AdwaitaRefresh-dark/' index.theme.in > \ 67 | _build/native/AdwaitaRefresh-dark/index.theme 68 | 69 | build-flatpak: build-native 70 | rm -rf _build/flatpak/repo 71 | mkdir -p _build/flatpak 72 | ostree init --mode=archive --repo=_build/flatpak/repo 73 | ostree --repo=_build/flatpak/repo config set core.min-free-space-percent 0 74 | 75 | $(MAKE) _internal-build-flatpak VARIANT=AdwaitaRefresh 76 | $(MAKE) _internal-build-flatpak VARIANT=AdwaitaRefresh-dark 77 | 78 | build-icons: _internal-repo 79 | rm -rf _build/icons _build/adwaita-icon-theme/index.theme 80 | 81 | # XXX: Generate a basic Makefile without autotools. 82 | echo 'SVGOUTDIR=Adwaita' > _build/adwaita-icon-theme/Makefile 83 | echo -n 'THEME_DIRS=' >> _build/adwaita-icon-theme/Makefile 84 | (cd _build/adwaita-icon-theme/Adwaita; echo !(cursors)/* | tr ' ' ',') >> \ 85 | _build/adwaita-icon-theme/Makefile 86 | awk '/^THEME_DIRS=/{p=1;next;}; p; /done/{p=0;}' \ 87 | _build/adwaita-icon-theme/Makefile.am >> _build/adwaita-icon-theme/Makefile 88 | make -C _build/adwaita-icon-theme index.theme 89 | 90 | mkdir -p _build/icons 91 | cp -r _build/adwaita-icon-theme/Adwaita _build/icons/AdwaitaRefresh 92 | cp _build/adwaita-icon-theme/index.theme _build/icons/AdwaitaRefresh 93 | rm -rf _build/icons/AdwaitaRefresh/cursors 94 | 95 | _internal-build-flatpak: 96 | rm -rf _build/flatpak/$(VARIANT) 97 | flatpak build-init --type=extension _build/flatpak/$(VARIANT) org.gtk.Gtk3theme.$(VARIANT) \ 98 | org.freedesktop.Platform org.freedesktop.Platform 18.08 99 | 100 | cp -r _build/native/$(VARIANT)/gtk-3.0/* _build/flatpak/$(VARIANT)/files 101 | mkdir -p _build/flatpak/$(VARIANT)/files/share/appdata 102 | sed 's/@NAME/$(VARIANT)/' appdata.xml.in > \ 103 | _build/flatpak/$(VARIANT)/files/share/appdata/org.gtk.Gtk3theme.$(VARIANT).appdata.xml 104 | appstream-compose --prefix=_build/flatpak/$(VARIANT)/files \ 105 | --basename=org.gtk.Gtk3theme.$(VARIANT) --origin=flatpak org.gtk.Gtk3theme.$(VARIANT) 106 | 107 | flatpak build-finish _build/flatpak/$(VARIANT) 108 | flatpak build-export _build/flatpak/repo _build/flatpak/$(VARIANT) 3.22 109 | flatpak build-bundle --runtime _build/flatpak/repo \ 110 | _build/flatpak/org.gtk.Gtk3theme.$(VARIANT).flatpak org.gtk.Gtk3theme.$(VARIANT) 3.22 111 | 112 | build: build-native build-flatpak build-icons 113 | 114 | _internal-uninstall-native: 115 | rm -rf $(THEMES)/AdwaitaRefresh{,-dark} 116 | 117 | _internal-uninstall-flatpak: 118 | if flatpak info --$(INSTALLATION) org.gtk.Gtk3theme.AdwaitaRefresh >/dev/null 2>&1; then\ 119 | flatpak uninstall -y --$(INSTALLATION) org.gtk.Gtk3theme.AdwaitaRefresh; fi 120 | if flatpak info --$(INSTALLATION) org.gtk.Gtk3theme.AdwaitaRefresh-dark >/dev/null 2>&1; then\ 121 | flatpak uninstall -y --$(INSTALLATION) org.gtk.Gtk3theme.AdwaitaRefresh; fi 122 | 123 | _internal-uninstall-icons: 124 | rm -rf $(ICONS)/AdwaitaRefresh 125 | 126 | uninstall-system-native: 127 | $(MAKE) _internal-uninstall-native THEMES=/usr/share/themes 128 | 129 | uninstall-system-flatpak: 130 | $(MAKE) _internal-uninstall-flatpak INSTALLATION=system 131 | 132 | uninstall-system-icons: 133 | $(MAKE) _internal-uninstall-icons ICONS=/usr/share/icons 134 | 135 | uninstall-system: uninstall-system-native uninstall-system-flatpak uninstall-system-icons 136 | 137 | uninstall-user-native: 138 | $(MAKE) _internal-uninstall-native THEMES=$(XDG_DATA_HOME)/themes 139 | 140 | uninstall-user-flatpak: 141 | $(MAKE) _internal-uninstall-flatpak INSTALLATION=user 142 | 143 | uninstall-user-icons: 144 | $(MAKE) _internal-uninstall-icons ICONS=$(XDG_DATA_HOME)/icons 145 | 146 | uninstall-user: uninstall-user-native uninstall-user-flatpak uninstall-user-icons 147 | 148 | _internal-install-native: _internal-uninstall-native 149 | mkdir -p $(THEMES) 150 | cp -r _build/native/* $(THEMES) 151 | 152 | _internal-install-flatpak: 153 | flatpak install -y --$(INSTALLATION) _build/flatpak/org.gtk.Gtk3theme.AdwaitaRefresh.flatpak 154 | flatpak install -y --$(INSTALLATION) \ 155 | _build/flatpak/org.gtk.Gtk3theme.AdwaitaRefresh-dark.flatpak 156 | 157 | _internal-install-icons: _internal-uninstall-icons 158 | mkdir -p $(ICONS) 159 | cp -r _build/icons/AdwaitaRefresh $(ICONS) 160 | 161 | install-system-native: build-native 162 | $(MAKE) _internal-install-native THEMES=/usr/share/themes 163 | 164 | install-system-flatpak: build-flatpak 165 | $(MAKE) _internal-install-flatpak INSTALLATION=system 166 | 167 | install-system-icons: build-icons 168 | $(MAKE) _internal-install-icons ICONS=/usr/share/icons 169 | 170 | install-system: install-system-native install-system-flatpak install-system-icons 171 | 172 | install-user-native: build-native 173 | $(MAKE) _internal-install-native THEMES=$(XDG_DATA_HOME)/themes 174 | 175 | install-user-flatpak: build-flatpak 176 | $(MAKE) _internal-install-flatpak INSTALLATION=user 177 | 178 | install-user-icons: build-icons 179 | $(MAKE) _internal-install-icons ICONS=$(XDG_DATA_HOME)/icons 180 | 181 | install-user: install-user-native install-user-flatpak install-user-icons 182 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # adwaita-refresh-installer 2 | 3 | A Makefile for installing the GNOME 3.32 Adwaita theme both natively and as a Flatpak. 4 | 5 | ``` 6 | # **************************************** WARNING **************************************** 7 | # This theme is installed under the name "AdwaitaRefresh", HOWEVER many apps change their 8 | # behavior based on the name "Adwaita". IN ADDITION, some parts of the new theme require 9 | # corresponding GTK3 code changes. Therefore, not everything will display 100% correctly. 10 | # Examples include switches, the pathbar and find floats. 11 | # *******DO NOT, I repeat, DO NOT FILE BUGS WITH GTK+ BASED ON THE BEHAVIOR OF THIS.******* 12 | # If something appears to be a bug, test it with the proper, *named* Adwaita first. 13 | # **************************************** WARNING **************************************** 14 | ``` 15 | 16 | ## Usage 17 | 18 | Run `make help`: 19 | 20 | ``` 21 | # Makefile help: 22 | # 23 | # build-native - Build the Adwaita theme files for standard use in _build/native. 24 | # build-flatpak - Build Flatpak bundles for the themes in _build/flatpak/. 25 | # build - Runs both of the above. 26 | # install-system-native - Install the theme files to /usr/share/themes. 27 | # install-system-flatpak - Install the Flatpak-ed theme system-wide. 28 | # install-system-icons - Install the icons system-wide. 29 | # install-system - Runs all the install-system-* targets. 30 | # install-user-native - Install the theme files to /home/ryan/.local/share/themes. 31 | # install-user-flatpak - Install the Flatpak-ed theme for this user only. 32 | # install-user-icons - Install the icons for to /home/ryan/.local/share/icons. 33 | # install-user - Runs all the install-user-* targets. 34 | # 35 | # Each install target as an uninstall equivalent, e.g. uninstall-user-native. 36 | # In addition, the install targets run the build targets automatically. 37 | # The build targets also update the local GTK+ checkout in _build/gtk automatically. 38 | ``` 39 | -------------------------------------------------------------------------------- /appdata.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.gtk.Gtk3theme.@NAME 4 | CC0-1.0 5 | @NAME Gtk theme 6 | @NAME Gtk theme 7 | 8 | -------------------------------------------------------------------------------- /index.theme.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=X-GNOME-Metatheme 3 | Name=@NAME 4 | Comment=Adwaita refresh 5 | Encoding=UTF-8 6 | 7 | [X-GNOME-Metatheme] 8 | Type=X-GNOME-Metatheme 9 | GtkTheme=@NAME 10 | MetacityTheme=@NAME 11 | IconTheme=Adwaita 12 | CursorTheme=Adwaita 13 | CursorSize=24 14 | --------------------------------------------------------------------------------