blob: ecce912260c8833e5aedcbb52a7c66c87e900155 (
plain)
1
2
3
4
5
6
7
8
9
|
#!/bin/sh
TMP=$(mktemp -p /dev/shm) &&
{ TYPE=$(curl -sL -w "%{content_type}\n" $@ -o "$TMP") && case "$TYPE" in
application/pdf) zathura "$TMP";;
image/*) sxiv "$TMP";;
text/*) less "$TMP";;
*) hexdump "$TMP";;
esac }
rm -f "$TMP"
|