summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavan Rikhi2018-03-24 10:08:46 -0400
committerPavan Rikhi2018-03-24 10:08:46 -0400
commit0fe7ee79b1b49271142f6cc85e4335ac34b8a2b2 (patch)
tree86a2843c1b7e4060fccf21b11dae28c4617bb4ff
downloadaur-0fe7ee79b1b49271142f6cc85e4335ac34b8a2b2.tar.gz
Fork ABS PKGBUILD, Add Commands to Customize & Rebuild Cursors
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD83
2 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..21e613133d92
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+# Generated by mksrcinfo v8
+# Sat Mar 24 13:06:13 UTC 2018
+pkgbase = adwaita-custom-cursor-colors
+ pkgdesc = GNOME's Adwaita Theme with Customizable Cursor Colors
+ pkgver = 3.28.0
+ pkgrel = 1
+ url = https://git.gnome.org/browse/adwaita-icon-theme
+ arch = any
+ license = LGPL3
+ license = CCPL:cc-by-sa
+ makedepends = intltool
+ makedepends = git
+ makedepends = gtk3
+ makedepends = gnome-common
+ makedepends = python2
+ makedepends = python2-pillow
+ makedepends = inkscape
+ makedepends = xorg-xcursorgen
+ depends = hicolor-icon-theme
+ depends = gtk-update-icon-cache
+ depends = librsvg
+ provides = adwaita-icon-theme
+ conflicts = adwaita-icon-theme
+ source = https://github.com/GNOME/adwaita-icon-theme/archive/3.28.0.tar.gz
+ sha256sums = da3f00ac6abb4514d92d2b614388122eead82d079decee26b167aea956e312d9
+
+pkgname = adwaita-custom-cursor-colors
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..779c6df07585
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,83 @@
+# Maintainer: Pavan RIkhi <pavan.rikhi@gmail.com>
+# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+
+# To Change the Colors of the Generated Cursor Files, Edit the FILL_COLOR &
+# OUTLINE_COLOR Variables in the `build()` Function.
+
+pkgname=adwaita-custom-cursor-colors
+pkgver=3.28.0
+pkgrel=1
+pkgdesc="GNOME's Adwaita Theme with Customizable Cursor Colors"
+url="https://git.gnome.org/browse/adwaita-icon-theme"
+arch=(any)
+license=(LGPL3 CCPL:cc-by-sa)
+depends=(hicolor-icon-theme gtk-update-icon-cache librsvg)
+makedepends=(intltool git gtk3 gnome-common python2 python2-pillow inkscape xorg-xcursorgen)
+provides=(adwaita-icon-theme)
+conflicts=(adwaita-icon-theme)
+source=("https://github.com/GNOME/adwaita-icon-theme/archive/$pkgver.tar.gz")
+sha256sums=('da3f00ac6abb4514d92d2b614388122eead82d079decee26b167aea956e312d9')
+
+_sourcefolder="adwaita-icon-theme-$pkgver"
+
+prepare() {
+ cd "$_sourcefolder"
+ autoreconf -fvi
+}
+
+build() {
+ cd "$_sourcefolder"
+
+ # Some Colors from the Molokai colorscheme you can pick
+ BACKGROUND="#1B1D1E"
+ #BLACK="#232526"
+ #WHITE="#F8F8F0"
+ #RED="#FF0000"
+ #ORANGE="#FD971F"
+ MAGENTA="#F92672"
+ #CYAN="#66D9EF"
+ #GREEN="A6E22E"
+
+ # Set Desired Filll & Outline Colors
+ FILL_COLOR="${MAGENTA}"
+ OUTLINE_COLOR="${BACKGROUND}"
+
+ # Replace the Colors in the Source SVG
+ cd src/cursors/
+ TEMP_VAR="42IPROBABLYDONTEXISTINTHESVGFILE9001"
+ sed -i -e "s/#ffffff/${TEMP_VAR}/g" \
+ -e "s/#bebebe/${TEMP_VAR}/g" \
+ -e "s/#dedede/${TEMP_VAR}/g" \
+ adwaita.svg
+ sed -i -e "s/#000000/${FILL_COLOR}/g" \
+ -e "s/#484848/${FILL_COLOR}/g" \
+ -e "s/#313131/${FILL_COLOR}/g" \
+ adwaita.svg
+ sed -i "s/${TEMP_VAR}/${OUTLINE_COLOR}/g" adwaita.svg
+
+ # Generate PNGs from the SVG
+ CORE_COUNT="$(grep -c '^core id' /proc/cpuinfo)"
+ ./renderpngs.py -r -s -t -o -m 32 -a -c -n "${CORE_COUNT}" adwaita.svg
+
+ # Generate XCursor files from the PNGS
+ cd pngs
+ mkdir originals
+ mv 24x24 32x32 48x48 64x64 96x96 originals/ # Not sure why these are still black...
+ cp -r 24x24_s1 24x24
+ cp -r 32x32_s1 32x32
+ cp -r 48x48_s1 48x48
+ cp -r 64x64_s1 64x64
+ cp -r 96x96_s1 96x96
+ ./make.sh
+ cd ../../..
+
+ # Now build the Theme
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$_sourcefolder"
+ make DESTDIR="$pkgdir" install
+}