2020-02-08 23:43:37 +00:00
|
|
|
#!/bin/sh
|
2019-05-29 16:33:49 +00: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 05:19:40 +00:00
|
|
|
|
2019-01-08 18:52:05 +00:00
|
|
|
basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
|
2018-07-30 05:19:40 +00:00
|
|
|
|
2018-10-04 18:00:58 +00:00
|
|
|
case "$1" in
|
2020-05-30 21:01:18 +00:00
|
|
|
*.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;;
|
|
|
|
*.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;;
|
|
|
|
*.sent) setsid -f sent "$1" >/dev/null 2>&1 ;;
|
2018-07-30 05:19:40 +00:00
|
|
|
esac
|