mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2025-10-07 07:22:36 +02:00
Merge 859d8e3288b7d2a0b8fe5e5bd55cf8b98067ac1e into c43f390f07098c42db5efce654b07870951b512a
This commit is contained in:
commit
8ff9dd6a91
@ -4,10 +4,18 @@
|
||||
# usually the pdf of a compiled document. I find this useful especially
|
||||
# running from vim.
|
||||
|
||||
basename="${1%.*}"
|
||||
silent_open() {
|
||||
setsid -f "${@}" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
case "${*}" in
|
||||
*.tex|*.sil|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) target="$(getcomproot "$1" || echo "$1")" ; setsid -f xdg-open "${target%.*}".pdf >/dev/null 2>&1 ;;
|
||||
*.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;;
|
||||
*.sent) setsid -f sent "$1" >/dev/null 2>&1 ;;
|
||||
case "${1}" in
|
||||
*.tex | *.sil | *.m[dse] | *.[rR]md | *.mom | *.[0-9])
|
||||
silent_open xdg-open "$(getcomproot "${1}" || echo "${1%.*}").pdf"
|
||||
;;
|
||||
*.html)
|
||||
silent_open "${BROWSER}" "${1%.*}.html"
|
||||
;;
|
||||
*.sent)
|
||||
silent_open sent "${1}"
|
||||
;;
|
||||
esac
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user