dotfiles

config files and scripts
git clone git://git.hanetzok.net/dotfiles
Log | Files | Refs

opout (486B)


      1 #!/bin/sh
      2 
      3 # opout: "open output": A general handler for opening a file's intended output,
      4 # usually the pdf of a compiled document.  I find this useful especially
      5 # running from vim.
      6 
      7 basename="${1%.*}"
      8 
      9 case "${*}" in
     10 	*.tex|*.sil|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) target="$(getcomproot "$1" || echo "$1")" ; setsid -f xdg-open "${target%.*}".pdf >/dev/null 2>&1 ;;
     11 	*.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;;
     12 	*.sent) setsid -f sent "$1" >/dev/null 2>&1 ;;
     13 esac