diff --git a/theme-scripts/psp-cat.sh b/theme-scripts/psp-cat.sh new file mode 100644 index 0000000..4de5656 --- /dev/null +++ b/theme-scripts/psp-cat.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Script for converting an png image to 8bit semitransparent with dimension suitable for category icon + +if [ ! command -v convert >/dev/null 2>&1 ]; then + >&2 echo "convert executable could not be found" + exit 128 +fi + + +if [ "$1" = "" ]; then + >&2 echo "zadej filename" + exit 1 +fi + +filename="$1" +mkdir -p ./cat +convert "$filename" -channel A -evaluate Multiply 0.9 +channel -resize 48x64 "cat/$filename" + diff --git a/theme-scripts/pspc.sh b/theme-scripts/pspc.sh new file mode 100644 index 0000000..e4aeb3c --- /dev/null +++ b/theme-scripts/pspc.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# Script for converting an png image to 8bit semitransparent files base-* and focus-* for using as menu items + +if [ ! command -v convert >/dev/null 2>&1 ]; then + >&2 echo "convert executable could not be found" + exit 128 +fi + +if [ ! command -v pngquant >/dev/null 2>&1 ]; then + >&2 echo "pngquant executable could not be found" + exit 128 +fi + + +if [ "$1" = "" ]; then + >&2 echo "zadej filename" + exit 1 +fi + +filename="$1" + +convert "$filename" -channel A -evaluate Multiply 0.5 +channel -resize 64x64 "prefocus-$filename" +pngquant 256 < "prefocus-$filename" > "focus-$filename" + +rm "prefocus-$filename" +convert "$filename" -channel A -evaluate Multiply 0.9 +channel -resize 48x48 "prebody-$filename" +pngquant 256 < "prebody-$filename" > "body-$filename" +rm "prebody-$filename" + diff --git a/theme-scripts/pspc2l.sh b/theme-scripts/pspc2l.sh new file mode 100644 index 0000000..66a6213 --- /dev/null +++ b/theme-scripts/pspc2l.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Script for converting an png image to 8bit semitransparent files base-2l* and focus-2l* for using as second level menu items + +if [ ! command -v convert >/dev/null 2>&1 ]; then + >&2 echo "convert executable could not be found" + exit 128 +fi + +if [ ! command -v pngquant >/dev/null 2>&1 ]; then + >&2 echo "pngquant executable could not be found" + exit 128 +fi + +if [ "$1" = "" ]; then + >&2 echo "zadej filename" + exit 1 +fi + +filename="$1" + +convert "$filename" -channel A -evaluate Multiply 0.5 +channel -resize 48x48 "prefocus-$filename" +pngquant 256 < "prefocus-$filename" > "focus-2l-$filename" +rm "prefocus-$filename" +convert "$filename" -channel A -evaluate Multiply 0.9 +channel -resize 32x32 "prebody-$filename" +pngquant 256 < "prebody-$filename" > "body-2l-$filename" +rm "prebody-$filename" +