Replacement for xdg-open that uses Syndicate for messaging.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xdg_open_ng/uri_runner.pr

20 lines
683 B

; Expose a dataspace over a unix socket
let ?root_ds = dataspace
<require-service <relay-listener <unix "/run/user/1000/dataspace"> $gatekeeper>>
<bind "syndicate" #x"" $root_ds>
<require-service <daemon uri_runner>>
<daemon uri_runner {
argv: "uri_runner"
protocol: text/syndicate
}>
? <service-object <daemon uri_runner> ?cap> [
$cap <config { actions: [
["gemini://.*|file:///.*.gmi", ["/run/current-system/sw/bin/kristall" "\\1"]]
["http://.*|https://.*|.*html", ["/run/current-system/sw/bin/firefox" "\\1"]]
["tox:.*|uri:tox:.*", ["/run/current-system/sw/bin/qtox" "\\1"]]
[".*\\.avi|.*\\.mp4|.*mkv", ["/run/current-system/sw/bin/mpv" "\\1"]]
] } >
]