voidrice/.scripts/tools/opout

12 lines
393 B
Text
Raw Normal View History

2018-10-04 14:00:58 -04:00
#!/bin/sh
# opout: "open output": A general handler for opening a file's intended output.
# I find this useful especially running from vim.
2018-10-04 14:00:58 -04:00
basename="${1%.*}"
2018-10-04 14:00:58 -04:00
case "$1" in
2018-11-24 09:08:43 -05:00
*.tex|*.md|*.rmd|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
2018-12-05 15:15:46 -05:00
*.html) setsid "$BROWSER" --new-window "$basename".html >/dev/null 2>&1 & ;;
2018-10-31 21:54:30 -04:00
*.sent) setsid sent "$1" >/dev/null 2>&1 & ;;
esac