Implementation of the "open" command that uses Syndicate and PCRE pattern matching to open URIs.
Go to file
Emery Hemingway f94473d4a6 Send arbitrary messages to arbitrary entities 2022-06-25 20:01:25 -05:00
src Send arbitrary messages to arbitrary entities 2022-06-25 20:01:25 -05:00
.gitignore Initial commit 2022-03-17 14:30:41 -05:00
README.md Send arbitrary messages to arbitrary entities 2022-06-25 20:01:25 -05:00
protocol.prs Send arbitrary messages to arbitrary entities 2022-06-25 20:01:25 -05:00
uri_runner.pr Send arbitrary messages to arbitrary entities 2022-06-25 20:01:25 -05:00
xdg_open_ng.nimble Send arbitrary messages to arbitrary entities 2022-06-25 20:01:25 -05:00

README.md

xdg-open-ng

An xdg-open replacement that uses Syndicate and PCRE pattern matching to open URIs.

There are two utilites, xdg-open and uri_runner. The former connects to a shared Syndicate dataspace via a UNIX socket at $SYNDICATE_SOCK otherwise $XDG_RUNTIME_DIR/dataspace and has no other configuration. The uri_runner component is intended to be managed by the Syndicate server thru which it receives configuration, see uri_runner.pr as an example.

Matching patterns to actions is done with action-handler records:

<action-handler "foo://(.*):(.*)" $entity <krempel ["--host=$1" "--port=$2"]> >

In the preceding example the URI foo://bar:42 would cause the message <krempel ["--host=bar" "--port=42"]> to be sent to $entity.

The protocol.nim file is generated from the protocol.prs schema, a Tupfile file is provided to do this.