From 986330f5162b308e63d8ae228d54240c1e73ad90 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Wed, 12 May 2021 23:37:42 +0200 Subject: 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. --- pkgs/profpatsch/xdg-open/types.dhall | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pkgs/profpatsch/xdg-open/types.dhall') 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 @@ -22,10 +22,15 @@ let Special = , notify : ∀(message : Text) → Command } +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 -- cgit 1.4.1