diff options
author | MagicalDrizzle | 2024-01-21 17:51:23 +0700 |
---|---|---|
committer | MagicalDrizzle | 2024-01-21 17:51:23 +0700 |
commit | 0f5eb8a876ed08d3cbed71712197a4801ab1af89 (patch) | |
tree | 04d200ba8bf4f7c6569509e2d60518db797287e6 | |
download | aur-0f5eb8a876ed08d3cbed71712197a4801ab1af89.tar.gz |
add package
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | matcha-gtk-theme.install | 14 | ||||
-rw-r--r-- | mate-button-fix.patch | 40 |
4 files changed, 131 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..207529a1b307 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = matcha-gtk-theme-maximize + pkgdesc = A flat design theme for GTK 3, GTK 2 and GNOME Shell. Replaces the restore button with the maximize button. + pkgver = 2023.10.30 + pkgrel = 1 + url = https://vinceliuice.github.io/theme-matcha.html + install = matcha-gtk-theme.install + arch = any + license = GPL3 + makedepends = setconf + optdepends = gtk-engine-murrine: GTK2 theme support + optdepends = gtk-engines: GTK2 theme support + optdepends = qogir-icon-theme: Recommended icon theme + conflicts = matcha-gtk-theme + conflicts = matcha-gtk-theme-git + options = !strip + source = matcha-gtk-theme-2023-10-30.tar.gz::https://github.com/vinceliuice/Matcha-gtk-theme/archive/2023-10-30.tar.gz + source = mate-button-fix.patch::https://github.com/vinceliuice/Matcha-gtk-theme/commit/819ccff3e9cd85de5216b5001f353d4f97112818.patch + sha256sums = 9e7c1b7055bd996eaa01e8cd30e098dc1873f98690d2ace6ecad0e945307d470 + sha256sums = 79460f0e51d2949577e56f08537d2ac6b5cdd3708f23f52ca30c619662a860c1 + +pkgname = matcha-gtk-theme-maximize diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ff448cef7173 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Mizuki Nguyen <temppart01 at gmail dot com> +# Contributor: Mark Wagie <mark dot wagie at proton dot me> +# Contributor: Jack Random <jack ät random.to> +# Contributor: Michael J. Pento <mjpento@verizon.net> +# Contributor: grimi <grimi at poczta dot fm> +_pkgname=matcha-gtk-theme +pkgname=matcha-gtk-theme-maximize +_pkgver=2023-10-30 +pkgver=${_pkgver//-/.} +pkgrel=1 +pkgdesc="A flat design theme for GTK 3, GTK 2 and GNOME Shell. Replaces the restore button with the maximize button." +arch=('any') +url="https://vinceliuice.github.io/theme-matcha.html" +license=('GPL3') +makedepends=('setconf') +optdepends=('gtk-engine-murrine: GTK2 theme support' + 'gtk-engines: GTK2 theme support' + 'qogir-icon-theme: Recommended icon theme') +conflicts=('matcha-gtk-theme' 'matcha-gtk-theme-git') +options=('!strip') +install="$_pkgname.install" +source=("$_pkgname-${_pkgver}.tar.gz::https://github.com/vinceliuice/Matcha-gtk-theme/archive/${_pkgver}.tar.gz" + "mate-button-fix.patch::https://github.com/vinceliuice/Matcha-gtk-theme/commit/819ccff3e9cd85de5216b5001f353d4f97112818.patch") +sha256sums=('9e7c1b7055bd996eaa01e8cd30e098dc1873f98690d2ace6ecad0e945307d470' + '79460f0e51d2949577e56f08537d2ac6b5cdd3708f23f52ca30c619662a860c1') + +prepare() { + cd "Matcha-gtk-theme-${_pkgver}" + # Set GTKSV_DIR to $pkgdir + setconf install.sh GTKSV_DIR "$pkgdir/usr/share/gtksourceview-3.0/styles" + # Patch a bug when using MATE. + patch -Np1 -i "${srcdir}/mate-button-fix.patch" + # Replaces restore button with maximize button. + cd src/metacity-1 + command cp -f max-icon.svg unmax-icon.svg + cd ../gtk + for i in assets-*/; do + cd $i + rm titlebutton-restore*.png + for image in titlebutton-maximize*.png; do cp "$image" "${image/maximize/restore}"; done + cd .. + done + cd ../xfwm4 + for i in assets-*/; do + cd $i + rm maximize-toggled*.png + for image in maximize*.png; do cp "$image" "${image/maximize/maximize-toggled}"; done + cd .. + done +} + +package() { + cd "Matcha-gtk-theme-${_pkgver}" + install -d "$pkgdir/usr/share/themes" + ./install.sh -d "$pkgdir/usr/share/themes/" +} diff --git a/matcha-gtk-theme.install b/matcha-gtk-theme.install new file mode 100644 index 000000000000..cbdb0f82de05 --- /dev/null +++ b/matcha-gtk-theme.install @@ -0,0 +1,14 @@ +post_install() { + echo "" + echo "To force Libadwaita appliations to use the gtk-4.0 theme," + echo "symlink the gtk-4.0 theme to config folder" + echo "(replace Matcha-dark-sea with chosen theme variant):" + echo "" + echo "mkdir -p ~/.config/gtk-4.0/" + echo "ln -sf /usr/share/themes/Matcha-dark-sea/gtk-4.0/{assets,gtk.css,gtk-dark.css} ~/.config/gtk-4.0/" + echo "" +} + +post_upgrade() { + post_install +} diff --git a/mate-button-fix.patch b/mate-button-fix.patch new file mode 100644 index 000000000000..f22d7a306534 --- /dev/null +++ b/mate-button-fix.patch @@ -0,0 +1,40 @@ +From 819ccff3e9cd85de5216b5001f353d4f97112818 Mon Sep 17 00:00:00 2001 +From: vinceliuice <vinceliuice@hotmail.com> +Date: Sat, 11 Nov 2023 09:59:47 +0800 +Subject: [PATCH] Fixed #225 + +--- + src/metacity-1/metacity-theme-3.xml | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/metacity-1/metacity-theme-3.xml b/src/metacity-1/metacity-theme-3.xml +index 60981726..64017eeb 100644 +--- a/src/metacity-1/metacity-theme-3.xml ++++ b/src/metacity-1/metacity-theme-3.xml +@@ -61,10 +61,7 @@ + <distance name="right_width" value="0" /> + <distance name="left_titlebar_edge" value="0"/> + <distance name="right_titlebar_edge" value="0"/> +- <distance name="title_vertical_pad" value="2"/> <!-- +- This needs to be 1 less then the +- title_vertical_pad on normal state +- or you'll have bigger buttons --> ++ <distance name="title_vertical_pad" value="2"/> + <distance name="bottom_height" value="0" /> + </frame_geometry> + +@@ -104,12 +101,12 @@ + <distance name="button_height" value="0"/> + </frame_geometry> + +-<frame_geometry name="modal" title_scale="small" hide_buttons="true" rounded_top_left="1" rounded_top_right="1" parent="small"> ++<frame_geometry name="modal" title_scale="small" hide_buttons="false" rounded_top_left="1" rounded_top_right="1" parent="small"> + <distance name="title_vertical_pad" value="5"/> + </frame_geometry> + + <!--chromium save dialog--> +-<frame_geometry name="attached" title_scale="small" has_title="false" hide_buttons="true" rounded_top_left="1" rounded_top_right="1" rounded_bottom_left="0" rounded_bottom_right="0" parent="normal"> ++<frame_geometry name="attached" title_scale="small" has_title="false" hide_buttons="false" rounded_top_left="1" rounded_top_right="1" rounded_bottom_left="0" rounded_bottom_right="0" parent="normal"> + <distance name="title_vertical_pad" value="0"/> + <distance name="bottom_height" value="1"/> + <distance name="left_width" value="1"/> |