mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
18 lines
427 B
Bash
18 lines
427 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
clear
|
||
|
|
||
|
WIDTH=$(xrandr | grep '\*' | awk -F 'x' '{print $1}' | sed 's/ //g')
|
||
|
OUTPUT_IMAGE="$HOME/.cache/wall.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 "Setting background to ${OUTPUT_IMAGE}"
|
||
|
feh --bg-scale ~/.cache/wall.png
|
||
|
|
||
|
echo "done!"
|