openbsd-ports/devel/xdg-utils/files/xdg-open-hook.sh
ajacoutot 724b5582a9 - merge xdg enhancements from productivity/thinkingrock
(support custom user hooks and create "open" and "email" links)

suggested by, feedback from and ok sturm@
2008-11-01 19:30:07 +00:00

17 lines
296 B
Bash

#!/bin/sh
# $OpenBSD: xdg-open-hook.sh,v 1.1 2008/11/01 19:30:07 ajacoutot Exp $
filename=`echo "$1" | sed s#file:##`
case $filename in
*.pdf)
if `which xpdf > /dev/null`; then
xpdf $filename &
elif `which acroread > /dev/null`; then
acroread $filename &
fi
;;
*)
opera "$1" &
;;
esac