gen wp thumb

This commit is contained in:
2026-02-18 15:04:58 +01:00
parent 7134b443c0
commit e23f71c4e2
2 changed files with 11 additions and 3 deletions

View File

@@ -98,7 +98,7 @@ if [ ! -f "$WALLPALDIR/${NAME}.clr" ]; then
magick ${WALLPATH} -resize 25% -colors 12 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr" magick ${WALLPATH} -resize 25% -colors 12 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
fi fi
fi fi
## kolory tapety do pliku wpcolors.clr
cat "$WALLPALDIR/${NAME}.clr" > "$HOME/.config/mabox/wpcolors.clr" cat "$WALLPALDIR/${NAME}.clr" > "$HOME/.config/mabox/wpcolors.clr"
@@ -107,7 +107,11 @@ THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR} mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${NAME}.png" THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]; then if [[ ! -f "$THUMB" ]]; then
magick ${WALLPATH} -resize 270x150^ -gravity center -extent 266x146 -bordercolor '#DDDDDD' -border 2 ${THUMB} magick ${WALLPATH} -resize 270x150^ -gravity center -extent 266x146 -bordercolor '#DDDDDD' -border 2 ${THUMB}
cp ${THUMB} "$HOME/.config/mabox/wpthumb.png"
else
cp ${THUMB} "$HOME/.config/mabox/wpthumb.png"
fi fi

View File

@@ -106,7 +106,11 @@ THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR} mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${NAME}.png" THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]; then if [[ ! -f "$THUMB" ]]; then
magick ${WALLPATH} -resize 270x150^ -gravity center -extent 266x146 -bordercolor '#DDDDDD' -border 2 ${THUMB} magick ${WALLPATH} -resize 270x150^ -gravity center -extent 266x146 -bordercolor '#DDDDDD' -border 2 ${THUMB}
cp ${THUMB} "$HOME/.config/mabox/wpthumb.png"
else
cp ${THUMB} "$HOME/.config/mabox/wpthumb.png"
fi fi