1
0
mirror of https://github.com/alrayyes/server-dotfiles synced 2023-11-14 15:56:25 +00:00
server-dotfiles/vifm/.scripts/generate-lock-image.sh

14 lines
347 B
Bash
Raw Normal View History

2019-03-29 18:53:22 +00:00
#!/bin/sh
clear
WIDTH=$(xrandr | grep '\*' | awk -F 'x' '{print $1}' | sed 's/ //g')
OUTPUT_IMAGE="$HOME/.cache/lock.png"
echo "Converting ${1} to ${OUTPUT_IMAGE}...."
convert "${1}" "${OUTPUT_IMAGE}"
echo "done!"
echo "Reszing ${OUTPUT_IMAGE} to width ${WIDTH}...."
convert "${OUTPUT_IMAGE}" -resize "${WIDTH}"x "${OUTPUT_IMAGE}"
echo "done!"