Add cool crab to the lock screen

This commit is contained in:
2021-04-26 16:56:48 +02:00
parent 3f649ef859
commit fc9bb175d1
2 changed files with 10 additions and 6 deletions

View File

@ -15,15 +15,19 @@ for CMD in $OPTIONAL_CMDS; do
fi
done
FILE="$(mktemp)"
FILE_RAW="$FILE.raw.jpg"
FILE="$FILE.jpg"
BASE_IMAGE_PATH="$(mktemp)"
INDEX=1
image_path() {
echo "$BASE_IMAGE_PATH$1.jpg"
}
UPSCALE="$(python3 -c "print(100*$BLUR_FACTOR, end='')")%"
DOWNSCALE="$(python3 -c "print(100/$BLUR_FACTOR, end='')")%"
grim "$FILE_RAW"
grim "$(image_path 1)"
convert -scale $DOWNSCALE -scale $UPSCALE "$FILE_RAW" "$FILE"
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)"
swaylock --config ~/.config/sway/swaylock.config --image "$FILE" $@
swaylock --config ~/.config/sway/swaylock.config --image "$(image_path 3)"