about summary refs log tree commit diff
path: root/pkgs/profpatsch/xdg-open/types.dhall
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-05-12 23:37:42 +0200
committerProfpatsch <mail@profpatsch.de>2021-05-12 23:42:13 +0200
commit986330f5162b308e63d8ae228d54240c1e73ad90 (patch)
tree8ec55bc3f9d935549859baf42f7964afdec93a0b /pkgs/profpatsch/xdg-open/types.dhall
parentba600abbfe2a123a5293511a21aec18b9d7d4818 (diff)
pkgs/profpatsch/xdg-open: directly pass MimeMatch to xdg-open script
No use in passing through the mime type now that we can just directly
render the commands in the protocol handlers.

This gives us the base for generating the Firefox handlers.json.
Diffstat (limited to 'pkgs/profpatsch/xdg-open/types.dhall')
-rw-r--r--pkgs/profpatsch/xdg-open/types.dhall12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/profpatsch/xdg-open/types.dhall b/pkgs/profpatsch/xdg-open/types.dhall
index 72184ad5..b7ae944b 100644
--- a/pkgs/profpatsch/xdg-open/types.dhall
+++ b/pkgs/profpatsch/xdg-open/types.dhall
@@ -23,9 +23,14 @@ let Special =
       }
 
 let
+    -- describes the command `cmd` to run for the matched mime type `mime`
+    MimeMatch =
+      { mime : Mime, cmd : Command }
+
+let
     -- Handler of an uri glob. Mime maps the uri to a file handler. Transparent is a command which, when run, returns a mimetype of the file.
     UriGlobHandler =
-      < Transparent : Command | Mime : Mime >
+      < Transparent : Command | Mime : MimeMatch >
 
 let UriMimeGlob =
       { desc : Text
@@ -36,11 +41,6 @@ let UriMimeGlob =
       , handler : UriGlobHandler
       }
 
-let
-    -- describes the command `cmd` to run for the matched mime type `mime`
-    MimeMatch =
-      { mime : Mime, cmd : Command }
-
 in  { Mime
     , Executable
     , Arg