aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/imgurl
blob: c5947129db90e5af4f4d0605978208e99c91a87d (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh

[ -z "$1" ] && exit

base="$(basename $1)"
ext="${base##*.}"
fname="/tmp/imgurl-$(date '+%s').$ext"

setsid curl -sL "$1" > "$fname" && nsxiv -a "$fname"  &