make background image transparent
This commit is contained in:
@@ -39,13 +39,14 @@ url+="&width=1080&height=1080"
|
|||||||
url+="&bbox=-6400000,-6400000,6400000,6400000"
|
url+="&bbox=-6400000,-6400000,6400000,6400000"
|
||||||
url+="&crs=AUTO:42003,9001,0,0"
|
url+="&crs=AUTO:42003,9001,0,0"
|
||||||
url+="&styles="
|
url+="&styles="
|
||||||
|
url+="&transparent=true"
|
||||||
url+="&format=image/png"
|
url+="&format=image/png"
|
||||||
url+="&access_token=$key"
|
url+="&access_token=$key"
|
||||||
|
|
||||||
# process incoming data
|
# process incoming data
|
||||||
[ ! -d "$outdir" ] && { mkdir -p "$outdir" || error "failed to access '$outdir'!"; }
|
[ ! -d "$outdir" ] && { mkdir -p "$outdir" || error "failed to access '$outdir'!"; }
|
||||||
curl "$url" -o "$outdir/tmp.png" || error "failed to download from url='$url'!"
|
curl "$url" -o "$outdir/tmp.png" || error "failed to download from url='$url'!"
|
||||||
magick "$outdir/tmp.png" -alpha set -channel RGBA -fuzz 1% -fill none -floodfill +0+0 white "$outdir/curr.png"
|
mv -f "$outdir/tmp.png" "$outdir/curr.png"
|
||||||
|
|
||||||
# update the feh background
|
# update the feh background
|
||||||
. "$HOME/.fehbg"
|
. "$HOME/.fehbg"
|
||||||
|
|||||||
Reference in New Issue
Block a user