$OpenBSD: patch-bin_xdg-open,v 1.2 2008/06/05 08:33:55 sturm Exp $
--- bin/xdg-open.orig	Thu Apr 10 07:14:51 2008
+++ bin/xdg-open	Thu Apr 10 07:14:34 2008
@@ -403,6 +403,15 @@ if [ -z "${url}" ] ; then
     exit_failure_syntax "file or URL argument missing"
 fi
 
+if which xdg-open-hook > /dev/null 2> /dev/null; then
+    xdg-open-hook "$url"
+    if [ $? -eq 0 ]; then
+        exit_success
+    else
+        exit_failure_operation_failed
+    fi
+fi
+
 detectDE
 
 if [ x"$DE" = x"" ]; then
