diff options
-rwxr-xr-x | browse | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -0,0 +1,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" |