voidrice/.scripts/opout

12 lines
389 B
Text
Raw Normal View History

2018-10-04 18:00:58 +00: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 18:00:58 +00:00
basename="${1%.*}"
2018-10-04 18:00:58 +00:00
case "$1" in
2018-11-01 01:54:30 +00:00
*.tex|*.md|*.rmd|*.ms|*.me) setsid zathura "$basename".pdf >/dev/null 2>&1 & ;;
*.html) setsid "$TRUEBROWSER" --new-window "$basename".html >/dev/null 2>&1 & ;;
*.sent) setsid sent "$1" >/dev/null 2>&1 & ;;
esac