voidrice/.scripts/opout

14 lines
381 B
Text
Raw Normal View History

#!/bin/bash
# opout: "open output": A general handler for opening a file's intended output.
# I find this useful especially running from vim.
filename=$(readlink -f "$1")
ext="${filename##*.}"
filename="${filename%.*}"
case "$ext" in
2018-09-29 20:02:59 +00:00
tex|md|rmd) setsid zathura "$filename".pdf & ;;
html) setsid $TRUEBROWSER --new-window "$filename".html & ;;
sent) setsid sent "$1" & ;;
esac