From bac5c5170cd48d913dc08cd64e8dd01046487e51 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Mon, 30 Mar 2020 17:32:36 +0200 Subject: showURLimage.sh now downloads to its own folder. --- showURLimage.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'showURLimage.sh') diff --git a/showURLimage.sh b/showURLimage.sh index cd7db1f..0650f0c 100755 --- a/showURLimage.sh +++ b/showURLimage.sh @@ -7,8 +7,10 @@ url="$1" echo "$url" | grep -i "youtube" >/dev/null && url="$(youtube-dl --get-thumbnail "$url")" -filename="/tmp/showURLimage$(date +%H%M%S)" +folder="/tmp/showURLimage" +filename="${folder}/$(date +%H%M%S)" +[ -d "$folder" ] || mkdir -p "$folder" curl "$url" > "$filename" sxiv -b -N "sxivfloat" "$filename" || notify-send "No image found at $url" -- cgit v1.2.1