about summary refs log tree commit diff
path: root/pkgs/profpatsch
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-05-08 22:15:40 +0200
committerProfpatsch <mail@profpatsch.de>2021-05-08 22:16:09 +0200
commit8a4e83a6de949fb7d6abab3bb7f58eccf5bf02c3 (patch)
tree73a74cfe9a207fa85b138217f733f0ce210cc10b /pkgs/profpatsch
parent1f3c53d2650a3e485dbfe857ae3d68b46ae18018 (diff)
pkgs/profpatsch/xdg-open: add lagrange as gemini & gopher handler
Diffstat (limited to 'pkgs/profpatsch')
-rw-r--r--pkgs/profpatsch/xdg-open/config.dhall12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/profpatsch/xdg-open/config.dhall b/pkgs/profpatsch/xdg-open/config.dhall
index a66c888e..a3586dda 100644
--- a/pkgs/profpatsch/xdg-open/config.dhall
+++ b/pkgs/profpatsch/xdg-open/config.dhall
@@ -15,6 +15,8 @@ let Command = CommandTemplate Arg
 let mime =
       { text =
         { html = [ "text", "html" ]
+        , gemini = [ "text", "gemini" ]
+        , gopher = [ "text", "gopher" ]
         , xml = [ "text", "xml" ]
         , any = [ "text", "*" ]
         }
@@ -61,6 +63,14 @@ let uriMimeGlobs
 
               in  UriGlobHandler.Mime mime.text.html
           }
+        , { desc = "gemini link"
+          , glob = [ "gemini://*" ]
+          , handler = UriGlobHandler.Mime mime.text.gemini
+          }
+        , { desc = "gemini link"
+          , glob = [ "gopher://*", "gophers://*" ]
+          , handler = UriGlobHandler.Mime mime.text.gopher
+          }
         , { glob = [ "mailto:*" ]
           , desc = "mail address"
           , handler = UriGlobHandler.Mime mime.mail-address
@@ -109,6 +119,8 @@ let mimeMatcher =
 
         in    [ { match = mime.mail-address, cmd = special.compose-mail-to }
               , { match = mime.text.html, cmd = special.open-in-browser }
+              , { match = mime.text.gemini, cmd = oneArg (pkgSame "lagrange") }
+              , { match = mime.text.gopher, cmd = oneArg (pkgSame "lagrange") }
               , { match = mime.text.xml, cmd = special.open-in-browser }
               , { match = mime.text.any, cmd = special.open-in-editor }
               , { match = mime.image.gif, cmd = special.open-in-browser }