2019-08-18 12:28:11 -04:00
|
|
|
#!/usr/bin/env sh
|
2019-05-29 12:33:49 -04:00
|
|
|
|
|
|
|
# opout: "open output": A general handler for opening a file's intended output,
|
|
|
|
# usually the pdf of a compiled document. I find this useful especially
|
|
|
|
# running from vim.
|
2018-07-30 01:19:40 -04:00
|
|
|
|
2019-01-08 13:52:05 -05:00
|
|
|
basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
|
2018-07-30 01:19:40 -04:00
|
|
|
|
2018-10-04 14:00:58 -04:00
|
|
|
case "$1" in
|
2020-01-19 19:26:28 -05:00
|
|
|
*.tex|*.md|*.[rR]md|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
|
2019-05-29 12:33:49 -04:00
|
|
|
*.[0-9]) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
|
|
|
|
*.html) setsid $BROWSER "$basename".html >/dev/null 2>&1 & ;;
|
2018-10-31 21:54:30 -04:00
|
|
|
*.sent) setsid sent "$1" >/dev/null 2>&1 & ;;
|
2018-07-30 01:19:40 -04:00
|
|
|
esac
|