In principle something like
sxiv http://link.to/image should be possible with curl.
Thats a whishlist item I would like to bring up for future versions.
No, because this can easily be achieved in a script outside of sxiv.
Possible to add file descriptor support ? like
sxiv <(curl -s https://i.redd.it/gy65o4mk3oe01.png)
@BurhanDanger I've added support for that in my branch: https://github.com/muennich/sxiv/pull/369
Alternatively, a script that you can put in your path:
#!/usr/bin/env bash
SXIV_PATH='/usr/bin/sxiv'
INPUT_ARGS=("$@")
NEW_INPUT_ARGS=("$SXIV_PATH")
for arg in "${INPUT_ARGS[@]}";
do
if [[ -f "$arg" ]]; then
NEW_INPUT_ARGS+=("$arg")
else
tmp="$(mktemp --suffix="-sxiv")"
if curl "$arg" --output "$tmp" 2> /dev/null; then
NEW_INPUT_ARGS+=("$tmp")
else
echo "sxiv: $arg: No such file or directory"
echo "sxiv: $arg: Failed to curl"
fi
fi
done
exec "${NEW_INPUT_ARGS[@]}"
Most helpful comment
Possible to add file descriptor support ? like
sxiv <(curl -s https://i.redd.it/gy65o4mk3oe01.png)