Add previews.

This commit is contained in:
tastytea 2020-05-21 01:48:30 +02:00
parent e3ee383cbe
commit fe246fd11a
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
5 changed files with 43 additions and 0 deletions

View File

@ -12,6 +12,12 @@ commit is the file `gentoo-cursors-tad-0.3.1.tar.bz2` from the Gentoo
mirrors. If you have the source files used to generate the cursors, please get mirrors. If you have the source files used to generate the cursors, please get
in touch. in touch.
== Previews
image:preview_gentoo.png[]
image:preview_gentoo-blue.png[]
image:preview_gentoo-silver.png[]
== Install == Install
=== Gentoo === Gentoo

37
misc/create_previews.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
# Generate previews from cursors.
if ! command -v xcur2png > /dev/null; then
echo "You need to install xcur2png." >&2
exit 1
fi
if ! command -v montage > /dev/null; then
echo "You need to install montage from imagemagick." >&2
exit 1
fi
for theme in gentoo gentoo-blue gentoo-silver; do
mkdir -p _create_preview.sh_tmp/png/
mkdir _create_preview.sh_tmp/unique/
find cursors/${theme}/cursors/* -type f -exec \
xcur2png -d _create_preview.sh_tmp/png/ -c - {} \;
for png in $(file _create_preview.sh_tmp/png/* | grep 48 | cut -d: -f1); do
cp "${png}" _create_preview.sh_tmp/unique/
done
rm -f _create_preview.sh_tmp/unique/left_ptr_watch_02[012356789]*
rm -f _create_preview.sh_tmp/unique/left_ptr_watch_03*
rm -f _create_preview.sh_tmp/unique/left_ptr_watch_1*
rm -f _create_preview.sh_tmp/unique/znurt_03[012345679]*
rm -f _create_preview.sh_tmp/unique/znurt_04*
rm -f _create_preview.sh_tmp/unique/znurt_1_*
montage _create_preview.sh_tmp/unique/* \
-geometry 48x48+4+4 -background 'transparent' preview_${theme}.png
rm -rf _create_preview.sh_tmp/
done

BIN
preview_gentoo-blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
preview_gentoo-silver.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
preview_gentoo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB