swaylock-cool: Clean up image files
This commit is contained in:
@ -15,11 +15,11 @@ for CMD in $OPTIONAL_CMDS; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
BASE_IMAGE_PATH="$(mktemp)"
|
BASE_IMAGE_DIR="$(mktemp -d)"
|
||||||
INDEX=1
|
INDEX=1
|
||||||
|
|
||||||
image_path() {
|
image_path() {
|
||||||
echo "$BASE_IMAGE_PATH$1.jpg"
|
echo "$BASE_IMAGE_DIR/$1.jpg"
|
||||||
}
|
}
|
||||||
|
|
||||||
UPSCALE="$(python3 -c "print(100*$BLUR_FACTOR, end='')")%"
|
UPSCALE="$(python3 -c "print(100*$BLUR_FACTOR, end='')")%"
|
||||||
@ -31,3 +31,5 @@ convert -scale $DOWNSCALE -scale $UPSCALE "$(image_path 1)" "$(image_path 2)"
|
|||||||
convert -composite -gravity center "$(image_path 2)" ~/.config/sway/ferris-stamp.png "$(image_path 3)"
|
convert -composite -gravity center "$(image_path 2)" ~/.config/sway/ferris-stamp.png "$(image_path 3)"
|
||||||
|
|
||||||
swaylock --config ~/.config/sway/swaylock.config --image "$(image_path 3)"
|
swaylock --config ~/.config/sway/swaylock.config --image "$(image_path 3)"
|
||||||
|
|
||||||
|
rm -r "$BASE_IMAGE_DIR"
|
||||||
|
|||||||
Reference in New Issue
Block a user