Add cool crab to the lock screen
This commit is contained in:
BIN
tree/.config/sway/ferris-stamp.png
Normal file
BIN
tree/.config/sway/ferris-stamp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
@ -15,15 +15,19 @@ for CMD in $OPTIONAL_CMDS; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
FILE="$(mktemp)"
|
BASE_IMAGE_PATH="$(mktemp)"
|
||||||
FILE_RAW="$FILE.raw.jpg"
|
INDEX=1
|
||||||
FILE="$FILE.jpg"
|
|
||||||
|
image_path() {
|
||||||
|
echo "$BASE_IMAGE_PATH$1.jpg"
|
||||||
|
}
|
||||||
|
|
||||||
UPSCALE="$(python3 -c "print(100*$BLUR_FACTOR, end='')")%"
|
UPSCALE="$(python3 -c "print(100*$BLUR_FACTOR, end='')")%"
|
||||||
DOWNSCALE="$(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)"
|
||||||
|
|||||||
Reference in New Issue
Block a user