From e4a64f6527936e85541f52a34384d15f70ea9872 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 30 Jul 2018 01:19:40 -0400 Subject: opout script added for opening .pdfs from vim --- .scripts/opout | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 .scripts/opout (limited to '.scripts/opout') diff --git a/.scripts/opout b/.scripts/opout new file mode 100755 index 0000000..28dcafd --- /dev/null +++ b/.scripts/opout @@ -0,0 +1,12 @@ +#!/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 + tex|md|rmd) zathura $filename.pdf & ;; + html) $BROWSER --new-window $filename.html & ;; +esac -- cgit v1.3.1